Transferred from: http://bytes.com/topic/asp-net/answers/443065-textbox-value-change-select-other-item-dropdownlist
You need to add the below JavaScript on ur HTML section of the page
<script language= "JavaScript" >
function Showvalue ()
{
Document. form1["Textboxname"].value =
Document. form1["Dropdownvalue"].value
}
</script>
The codebehind file Add this line
DROPDOWNCONTROL.ATTRIBUTES.ADD ("onchange", "Javascr Ipt:showvalue ()");
Now if you change the value of the drop, the Textbox would be
Filled without refreshing the page
Http://forums.asp.net/t/1796597.aspx?How+to+select+a+value+in+dropdownlist
"Server"><script type="Text/javascript">function Sethref () {varTEXTB = document.getElementById ('<%=TextBox1.ClientID%>'); varParlab = document.getElementById ('<%=Dropdown1.ClientID%>'). Options[document.getelementbyid ('<%=Dropdown1.ClientID%>'). Selectedindex].text; if(parlab!='--select deptname--') {Textb.value=Parlab}Else{Textb.value="'; } } </script> <title></title>"Form1"runat="Server"> <div> <asp:button id="Reload"runat="Server"onclick="Reload_click"/> <asp:textbox id="TextBox1"runat="Server"></asp:TextBox> <asp:dropdownlist id="Dropdown1"runat="Server"Onchange="sethref ();"> <asp:listitem>--SelectDeptname--</asp:listitem> <asp:ListItem>mama</asp:ListItem> <asp:listitem>kaka</asp: listitem> <asp:ListItem>nana</asp:ListItem> </asp:DropDownList> </div> </fo Rm></body>http://blog.csdn.net/lvincent_china/article/details/7209517
"http://www.w3.org/1999/xhtml">"Server"> <title></title> <script type="Text/javascript"Src=".. /js/jquery-1.4.2.min.js"></script> <script type="Text/javascript">$ (document). Ready (function () {$ ('#<%=dropdownlist1.clientid%>'). Bind ("KeyUp Change", function () {//Use bind () to attach a handler to the KeyUp and change events:$('#message'). Text (""); if($( This). val ()! ="") {//Check If the selected value of the DropDownList is empty$('#message'). Text ("Text:"+ $( This). Find (": Selected"). Text () +"Value:"+ $( This). Val ());//Retrieve the Text/value pair and display in the div area ' message ': } Else { $('#message'). Text (""); } }) }) </script>"Form1"runat="Server"> <div> <asp:dropdownlist id="DropDownList1"runat="Server"> <asp:listitem value=""text="Please select"></asp:ListItem> <asp:listitem value="1"text=" Standard"></asp:ListItem> <asp:listitem value="2"text="Silver"></asp:ListItem> <asp:listitem value="3"text="Gold"></asp:ListItem> <asp:listitem value="4"text="Premier"></asp:ListItem> </asp:DropDownList> </div> <div id="message"></div> </form></body>The value of the TextBox changes with the DropDownList value