How do I put multiple objects in a NavigateURL link?

J

jm

Consider:

NavigateUrl= '<%# DataBinder.Eval(Container.DataItem, "ORDER_ID",
"informationmain.aspx?txt_command=EDIT&case_id={0}&ddl1_selected_value=1&ddl2_selected_text=Complaint")
%>

Obviously, the last part is hard coded (past the {0}).

What I am trying to find out is how to put more than just the {0} in
there and that from a variable. In the code above, I have a variable,
but I don't know how to put it in the datagrid format here. I hope
this make sense. Thank you for any help.

So,

NavigateUrl= '<%# DataBinder.Eval(Container.DataItem, "ORDER_ID",
"informationmain.aspx?txt_command=EDIT&case_id={0}&ddl1_selected_value=variable2&ddl2_selected_text=variable2")
%>

Thank you again.
 
P

Peter Bromberg [C# MVP]

One way:

NavigateUrl= '<%# CreateUrl(DataBinder.Eval(Container.DataItem,
"ORDER_ID"));

private string CreateUrl( string input)
{
return "informationmain.aspx?txt_command=EDIT&case_id=" + input +
"&ddl1_selected_value=1&ddl2_selected_text="+ variable2 ;
}


-- I may have some syntax errors there, but you get the idea.
--Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top