Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Help needed(getting the html drop down list value in c# servercode)

Reply
Thread Tools

Help needed(getting the html drop down list value in c# servercode)

 
 
Raghu Raman
Guest
Posts: n/a
 
      01-24-2005


hi,

in my aspx page ,i am creating a html select(dropdown list) in runtime
and assigning the datasource to it.The control is displayed nice.the
control is created in the Infragistics Grid cell*


But i need to get the value selected from this html drop down list also
thru my server side event.

Herewith i 've given the code snippet for your glance.

''----------------------------------------------------------------------
-----
Application[Appsid] = "";
while(dr1.Read())
{

Application[Appsid] = Application[Appsid] +
"<option Value=''" + dr1[0] + "''>" +
dr1[1] + "</option>";
//Coltype="<asp:dropdownlist ID='lstSelItem' visible='true'
height=100px DataTextField=''" + dr1[0] + " DataValueField=''" + dr1[1]
+ " pkgID width =150px runat='server'></asp:dropdownlist>";
}
Coltype="<Select name='" + Appsid + "' ID='" + Appsid + "'
OnServerChange='drbchanged_ServerChanged' runat='server' style='WIDTH:
100px; HEIGHT: 32px top=14'> " + Application[Appsid] + " </select>";
//Coltype="<Select ID='" + Appsid + "' runat='server' onblur='var
h=document.getElementById('Hdc'); h=document.forms[0]." + Appsid +
".options[document.forms[0]." + Appsid +
".selectedIndex].text;style='WIDTH: 100px; HEIGHT: 32px top=14'> " +
Application[Appsid] + " </select>";


ug.Rows[i].Cells[Col].Text=Coltype;
''----------------------------------------------------------------------
------




Regards
Raghu

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Multiple select drop down poplulating sub drop down scott@dettcom.com Javascript 3 11-09-2006 07:50 PM
Auto Drop down a Drop Down List xxbmichae1@supergambler.com Javascript 5 11-23-2005 01:35 AM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM



Advertisments