Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

I have a formview on my page that requires a hyperlink that contains multiple values such as:

viewscreen.aspx?ID={0}&SOURCE=xxxxxx&SUBJECT=xxxxxxx

I can get the first part working: viewscreen.aspx?ID={0} as the {0} is the value of the bound item, but how can I populate the other values for SOURCE & SUBJECT?

The values for SOURCE & SUBJECT are in the same form and are also bound label items...

Any help is most appreciated as ever.

Thanks

Pete

PS: I have inlcuded the entry at the moment as it appears on the .aspx page:

XML
<asp:HyperLink ID="COMMUNICATION_IDLabel" runat="server"
                                                NavigateUrl='<%# Eval("COMMUNICATION_ID", "viewcase.aspx?COMMUNICATION_ID={0}")%>'
                                                Text='<%# Eval("COMMUNICATION_ID") %>'></asp:HyperLink>
Posted
Updated 25-Oct-10 0:15am
v2

viewscreen.aspx?ID={0}"&SOURCE="+Label1.Text+"&SUBJECT="+Label2.Text;

//viewsource page load event.

string src = Request.QueryString["SOURCE"];
string sub = Request.QueryString["SUBJECT"];

//src has SOURCE(Label1.Text) value and sub has SUBJECT(Label2.Text) value.
 
Share this answer
 
Comments
codemagpie 25-Oct-10 7:02am    
Thanks guys for all your answers, most appreciated as usual
Hi
You can get using
C#
string source = Request.QueryString["SOURCE"];
string subject = Request.QueryString["SUBJECT"];  


Thanks,
Imdadhusen
 
Share this answer
 
Comments
codemagpie 25-Oct-10 6:09am    
Hi Imdadhusen

Would you be able to give a little example as I'm new to this and not sure how to write that as valid code for the QueryString.

Thanks

Pete
Sunasara Imdadhusen 25-Oct-10 7:14am    
Yes, why not, please do let me know whenever you want any help from my site i will give you best answer as possible.
yoy can use query string for this
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900