RSS

passing multiple values in Querystring Using PostBackUrL

11 Aug

Some Time you Need Muliple parmater Pass to QueryStirng and Need Both of Value to Next Page for Update of Delete Record.And using Server Control Button Property Like PostBackUrl…..

<asp:Button ID=”Button1″ runat=”server” PostBackUrl='<%#String.Format(“update_routinemanagement.aspx?ClassID={0}&RoutineIDs={1}”,Eval(“Class_ID”),Eval(“RoutineID”))%>’
SkinID=”Edit” />

To Access The Query String at DestinationPage

if (Request.QueryString[“ClassID”] != null && Request.QueryString[“ClassID”].ToString() != string.Empty && Request.QueryString[“RoutineIDS”] != null && Request.QueryString[“RoutineIDS”].ToString() != string.Empty)
{
_RoutineID = int.Parse(Request.QueryString[“RoutineIDS”].ToString());
ViewState[“RoutineIDS”] = _RoutineID;
_ClassID = int.Parse(Request.QueryString[“ClassID”].ToString());
ViewState[“ClassID”] = _ClassID;

And Other Different Way From Other Website

Process 1
PostBackUrl='<%# string.format( "ViexProductFullDesc.aspx?ProductID={0}&code={1}",Eval("ProductID"),Eval("PRODUCTCODE"))) %>'

Process 2

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

Process 3

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

But i Use Upper Link
Advertisements
 
3 Comments

Posted by on August 11, 2010 in ASP Dot Net C#

 

3 responses to “passing multiple values in Querystring Using PostBackUrL

  1. karima

    June 24, 2011 at 3:15 pm

    Thank you ,

    it’s very helpful

     
  2. mido

    March 30, 2013 at 10:53 am

    solve here go to link
    http://bit.ly/11G4uzf

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: