hi , i m new to asp and leraning it...
i have only one page in which i take some values like name, dob and education degree. after post back i return to this page iteslf.. but the values in dropdown list is not tha what i hadve selected(coz it do not support viewstates).
is there any method to retrive the values back in drop down.
for text i m usoing like this.
<tr>
<td align="right" > Name : </td>
<td><input type=text id=txtName name=Name style="width: 300px" value="<%=reque st.Form("Name") %>" /></td>
</tr>
and for drop down i m using like this.......
<tr>
<td align="right"> Qualification : </td>
<td><select style="width: 300px" id= ddlDegree name=degree>
<option value="1" <%=BE %> >BE</option>
<option value="2" <%=BTECH %>>B TECH</option>
<option value="3" <%=MCA %>>MCA</option>
<option value="4" <%=MBA %>>MBA</option>
<option value="5" <%=MTECH %>>M TECH</option>
</select></td>
</tr>
<%
select case (request.Form(" degree"))
case "1"
BE="selected"
case "2"
BTECH="selected "
case "3"
MCA="selected"
case "4"
MBA="selected"
case "5"
MTECH="selected "
end select
%>
but what if i have too many values in drop down.. is ther any better way to do this???
pls help..
thnx in advance.
i have only one page in which i take some values like name, dob and education degree. after post back i return to this page iteslf.. but the values in dropdown list is not tha what i hadve selected(coz it do not support viewstates).
is there any method to retrive the values back in drop down.
for text i m usoing like this.
<tr>
<td align="right" > Name : </td>
<td><input type=text id=txtName name=Name style="width: 300px" value="<%=reque st.Form("Name") %>" /></td>
</tr>
and for drop down i m using like this.......
<tr>
<td align="right"> Qualification : </td>
<td><select style="width: 300px" id= ddlDegree name=degree>
<option value="1" <%=BE %> >BE</option>
<option value="2" <%=BTECH %>>B TECH</option>
<option value="3" <%=MCA %>>MCA</option>
<option value="4" <%=MBA %>>MBA</option>
<option value="5" <%=MTECH %>>M TECH</option>
</select></td>
</tr>
<%
select case (request.Form(" degree"))
case "1"
BE="selected"
case "2"
BTECH="selected "
case "3"
MCA="selected"
case "4"
MBA="selected"
case "5"
MTECH="selected "
end select
%>
but what if i have too many values in drop down.. is ther any better way to do this???
pls help..
thnx in advance.
Comment