2009-03-03 15 views
1

ASP.net MVC projesiyle garip bir problemle karşılaştım.html formu IE8'de (IE7 Uyumluluğu) seçme listesinde çalışmaz

Aşağıdaki kod Firefox, krom, Safari IE8 çalışıyor - AMA değil IE8 ben Formu Koleksiyon SelectStatus ve ItemID listeler SetStatus Yöntem bir kırılma noktasını ayarlamak

<% Using Ajax.BeginForm("SetStatus", "StatusControl", New AjaxOptions With {.Confirm = "Are you sure you wish to change the Status?", .OnBegin = "Show_Updating", .OnComplete = "Hide_Updating"})%> 
    <%=Html.Hidden("ItemID")%> 
    <select id="SelectStatus" name="SelectStatus"> 
     <option selected="selected">Active</option> 
     <option>Disable</option> 
    </select> 
    <input type="submit" value="OK" title="Set Status" class="small_button" /> 
<% End Using%> 

IE7 uyumluluk modunda. SelectStatus, "Aktif" veya "Devre Dışı Bırak" yerine "" olarak çözülür Diğer tüm tarayıcılarda, bu doğru bir şekilde çözülür!

Herhangi bir fikir neler oluyor? IE-8 RC1 kullanıyorum.

Aşağıda SetStatus Kontrol yöntemi

<AcceptVerbs(HttpVerbs.Post)> _ 
Function SetStatus(ByVal form As FormCollection) 
    Dim status = form("SelectStatus") 

    Select Case status 
     Case "Active" 
      Dim ItemID As Integer = form("ItemID") 
      Return Restore(ItemID) 
     Case "Disable" 
      Dim ItemID As Integer = form("ItemID") 
      Return Disable(ItemID) 
    End Select 

    Return Content("Errors") 
End Function 

cevap

2

bu teşekkürler çalıştı

<option value="Active" selected="selected">Active</option> 
<option value="Disable">Disable</option> 
+0

seçenek için bir explict değeri ayarı deneyin! –

İlgili konular