Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: 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 1:21am
Edited 5-May-10 1:31am
Ankur\m/49.3K
v2
Comments
Ankur\m/ at 5-May-10 7:33am
   
Use PRE tag (Code Block), to surround your code.
hiren soni at 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/ at 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
0 OriginalGriff 300
1 Sergey Alexandrovich Kryukov 176
2 PhilLenoir 164
3 Richard MacCutchan 160
4 Sharmanuj 146
0 Sergey Alexandrovich Kryukov 6,081
1 OriginalGriff 5,115
2 CPallini 2,473
3 Richard MacCutchan 1,597
4 Abhinav S 1,505


Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 26 May 2014
Copyright © CodeProject, 1999-2014
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