Click here to Skip to main content
12,629,978 members (34,010 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB ASP.NET VB.NET
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.

<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 :

<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 5-May-10 2:21am
Updated 5-May-10 2:31am
Ankur\m/50.5K
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. :)
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

use string.format properly


String.Format("ViexProductFullDesc.aspx?ProductID={0}&code={1}",
Eval("ProductID"),
Eval("PRODUCTCODE"))
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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

?

Cheers
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

hi how to pass same query string in multiple pages???

thnks in advance...
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.161205.3 | Last Updated 26 May 2014
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100