| | |
asynchronous dropdownlist any idea
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Feb 2007
Posts: 29
Reputation:
Solved Threads: 1
Hey Use AJAX Extension controls .Which are available at http://ajax.asp.net/default.aspx?tabid=47.Download and install and use it.DOcumentation also there you can download it use it.
coming to your problem I solved using AJAX controls as
<script runat="server">
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox1.Text = DropDownList1.SelectedItem.Value;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp
criptManager ID="ScriptManager1" runat="server">
</asp
criptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp
ropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
Width="100px">
<asp:ListItem Selected="True">first_item</asp:ListItem>
<asp:ListItem>second_item</asp:ListItem>
</asp
ropDownList>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
I think this works
coming to your problem I solved using AJAX controls as
<script runat="server">
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox1.Text = DropDownList1.SelectedItem.Value;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp
criptManager ID="ScriptManager1" runat="server"></asp
criptManager><asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp
ropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"Width="100px">
<asp:ListItem Selected="True">first_item</asp:ListItem>
<asp:ListItem>second_item</asp:ListItem>
</asp
ropDownList><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
I think this works
![]() |
Similar Threads
- Help with dropdownlist data adding? (VB.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: select check boxes
- Next Thread: Sending an acknowledgement via Email while storing data in ASP.NET1.0
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# c#gridviewcolumn cac checkbox click commonfunctions compatible confirmationcodegeneration content courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dialog dropdownlist dynamically edit expose fileuploader fill flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers







so did it work?