מה הוא הקוד שאני מוסיף ל-DROP DOWN LIST כדי שיעבור לדף אחר?? - תכנות - HWzone פורומים
עבור לתוכן
  • צור חשבון

מה הוא הקוד שאני מוסיף ל-DROP DOWN LIST כדי שיעבור לדף אחר??


yotam360

Recommended Posts

<asp:DropDownList ID="DropDownList1" runat="server">

<asp:ListItem Value=F14>F-14</asp:ListItem>

<asp:ListItem Value=F15>F-15</asp:ListItem>

<asp:ListItem Value=F16>F-16</asp:ListItem>

<asp:ListItem Value=F18>F-18</asp:ListItem>

<asp:ListItem Value=F22>F-22</asp:ListItem>

<asp:ListItem Value=F117>F-117</asp:ListItem>

<asp:ListItem Value=B2>B-2</asp:ListItem>

<asp:ListItem Value=B52>B-52</asp:ListItem>

<asp:ListItem Value=A10>A-10</asp:ListItem>

</asp:DropDownList><br />

מה הוא הקוד שאני מוסיף ל-DROP DOWN LIST כדי שיעבור לדף אחר??

מה אני צריך להוסיף פה??

קישור לתוכן
שתף באתרים אחרים

משהו כזה


<script runat="server">

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
switch (DropDownList1.SelectedValue)
{
case 1:
Response.Redirect("Page1.aspx");
break;
case 2:
Response.Redirect("Page2.aspx");
break;
}
}
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem Value="0">item 0</asp:ListItem>
<asp:ListItem Value="1">item 1</asp:ListItem>
<asp:ListItem Value="2">item 2</asp:ListItem>
</asp:DropDownList>
</asp:Content>

[code]

קישור לתוכן
שתף באתרים אחרים

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

×
  • צור חדש...