Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have used asp:imagebutton and i want to pass multiple QueryString value to other page. I am able to pass 1 value but don't know how to do with multiple value. Here is how I did with single value.

XML
<asp:ImageButton id="ImageButton1" runat ="server" ImageUrl ='<%# eval("IMAGEPATH") %>' PostBackUrl='<%# Eval("ProductID", "ViexProductFullDesc.aspx?ProductID={0}") %>' />


Can anybody tell how can I modify the code to pass multiple values?

I tried this also :

XML
<asp:ImageButton id="ImageButton1" runat ="server" ImageUrl ='<%# eval("IMAGEPATH") %>' PostBackUrl='<%# string.format(Eval("ProductID"),EVAL("PRODUCTCODE"), "ViexProductFullDesc.aspx?ProductID={0}&code={1}")) %>' />


But not working.

Any help....
Posted
Updated 5-May-10 1:31am
v2
Comments
Ankur\m/ 5-May-10 7:33am    
Use PRE tag (Code Block), to surround your code.
hiren soni 5-May-10 7:38am    
what u did ankur? i dint get anything. If u have any solution plz give me proper answer. I dont understand if u have given any answer.
Ankur\m/ 5-May-10 8:00am    
I pre-tagged your question so that it looks more readable. Your questions would get more responses if it is properly framed. You got your first answer after I edited it after about 10 minutes you asked the question. In most cases questions are answered within a couple minutes. So it's just an advice. It's up to you that you consider it or not. :)

use string.format properly


C#
String.Format("ViexProductFullDesc.aspx?ProductID={0}&code={1}",
Eval("ProductID"),
Eval("PRODUCTCODE"))
 
Share this answer
 
Shouldn't it be more like :
PostBackUrl='<%# string.format( "ViexProductFullDesc.aspx?ProductID={0}&code={1}",Eval("ProductID"),Eval("PRODUCTCODE"))) %>'


?

Cheers
 
Share this answer
 
hi how to pass same query string in multiple pages???

thnks in advance...
 
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