Click here to Skip to main content
16,011,611 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: open a PDF report Pin
Paddy Boyd19-Apr-06 2:14
Paddy Boyd19-Apr-06 2:14 
QuestionGrid View paging Pin
?!?18-Apr-06 21:48
?!?18-Apr-06 21:48 
Questiondropdown list Pin
ptvce18-Apr-06 20:48
ptvce18-Apr-06 20:48 
AnswerRe: dropdown list Pin
enjoycrack18-Apr-06 21:10
enjoycrack18-Apr-06 21:10 
GeneralRe: dropdown list Pin
ptvce18-Apr-06 22:23
ptvce18-Apr-06 22:23 
GeneralRe: dropdown list Pin
enjoycrack18-Apr-06 22:40
enjoycrack18-Apr-06 22:40 
GeneralRe: dropdown list Pin
VaibhavJ18-Apr-06 22:43
VaibhavJ18-Apr-06 22:43 
AnswerRe: dropdown list Pin
VaibhavJ18-Apr-06 23:12
VaibhavJ18-Apr-06 23:12 
Hi,

I think u must be returning a DataSet to bind it to the dropdown containing "ID" and "Name"...You can do following to display "ID/Name" to DropdownList where ID & Name are column names u return through ur query.

if(ds!=null && ds.Tables.Count > 0)
{
if( ds.Tables[0].Rows.Count > 0)
{
ds.Tables[0].Columns.Add("strDisplay",typeof(System.String));
for(int i = 0 ; i < ds.Tables[0].Rows.Count;i++)
{
ds.Tables[0].Rows[i]["strDisplay"] = ds.Tables[0].Rows[i]["ID"] +"/" + ds.Tables[0].Rows[i]["Name"] ;
}
}
}

And to bind the dropdownlist

DropdownList.DataTextField = "strDisplay";
DropdownList.DataValueField = "Value";

I think this should work fine...

Thank u,
Vaibhav
GeneralRe: dropdown list Pin
enjoycrack19-Apr-06 0:48
enjoycrack19-Apr-06 0:48 
GeneralRe: dropdown list Pin
VaibhavJ19-Apr-06 0:54
VaibhavJ19-Apr-06 0:54 
GeneralRe: dropdown list Pin
RSArockiam19-Apr-06 2:34
RSArockiam19-Apr-06 2:34 
GeneralRe: dropdown list Pin
VaibhavJ19-Apr-06 4:01
VaibhavJ19-Apr-06 4:01 
GeneralRe: dropdown list Pin
ptvce19-Apr-06 4:55
ptvce19-Apr-06 4:55 
Questionconvert sting to control Pin
sureshkumar_a18-Apr-06 20:41
sureshkumar_a18-Apr-06 20:41 
AnswerRe: convert sting to control Pin
enjoycrack18-Apr-06 21:16
enjoycrack18-Apr-06 21:16 
GeneralRe: convert sting to control Pin
sureshkumar_a18-Apr-06 21:30
sureshkumar_a18-Apr-06 21:30 
GeneralRe: convert sting to control Pin
enjoycrack18-Apr-06 21:35
enjoycrack18-Apr-06 21:35 
GeneralRe: convert sting to control Pin
Guffa18-Apr-06 21:50
Guffa18-Apr-06 21:50 
QuestionHow to execute a javascript after a post back event occured?? Pin
SIJUTHOMASP18-Apr-06 19:58
professionalSIJUTHOMASP18-Apr-06 19:58 
AnswerRe: How to execute a javascript after a post back event occured?? Pin
enjoycrack18-Apr-06 20:10
enjoycrack18-Apr-06 20:10 
GeneralRe: How to execute a javascript after a post back event occured?? Pin
SIJUTHOMASP18-Apr-06 20:58
professionalSIJUTHOMASP18-Apr-06 20:58 
GeneralRe: How to execute a javascript after a post back event occured?? Pin
enjoycrack18-Apr-06 21:20
enjoycrack18-Apr-06 21:20 
AnswerRe: How to execute a javascript after a post back event occured?? Pin
Arvind B18-Apr-06 21:43
Arvind B18-Apr-06 21:43 
QuestionRe: How to execute a javascript after a post back event occured?? Pin
SIJUTHOMASP18-Apr-06 22:33
professionalSIJUTHOMASP18-Apr-06 22:33 
AnswerRe: How to execute a javascript after a post back event occured?? Pin
Guffa18-Apr-06 23:14
Guffa18-Apr-06 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.