Redirection using query string

Posted by Mandlaa under ASP.NET on 10/11/2013 | Points: 10 | Views : 915 | Status : [Member] | Replies : 2
1.aspx:

First page the values i am sending to second page using Query string

Response.Redirect("~/RedirectionURL.aspx?BatchID=" + Bno + "&ClientID=" + Cno + "&TagId=" + Tno);

2.aspx:

This 3 values retriving in second page


int Bid = Convert.ToInt32(Request.QueryString.Get("BatchID"));
int Cid = Convert.ToInt32(Request.QueryString.Get("ClientID"));
string Tno = Request.QueryString.Get("TagId");

after that ------ actual url like this RedirectionURL.aspx?BatchID=1&ClientID=101&TagId=200 I want this url to change like this

RedirectionURL.aspx?1.101.200

How to convert This /RedirectionURL.aspx?BatchID=1&ClientID=101&TagId=200 URL to /RedirectionURL.aspx?1.101.200 this URL?????




Responses

Posted by: Bandi on: 10/11/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer
http://stackoverflow.com/questions/3371092/iis-url-rewriting-to-redirect-querystring-addresses-to-mvc-style-path-to-preserv
http://aboutdev.wordpress.com/2013/01/22/asp-net-mvc-3-redirect-query-string-with-id/

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Mandlaa, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mandlaa on: 10/11/2013 [Member] Starter | Points: 25

Up
0
Down
Using asp.net,
MYCODE is

Page1:

Cno = GridView1.SelectedRow.Cells[6].Text;
Bno = GridView1.SelectedRow.Cells[3].Text;

Tno = GridView1.SelectedRow.Cells[7].Text;

Response.Redirect("~/RedirectionURL.aspx?BatchID=" + Bno + "&ClientID=" + Cno + "&TagId=" + Tno); this code i am writting in first page

Page 2: The page 1 values retrive values like this based on this values perforn operations finally the url Like this /RedirectionURL.aspx?BatchID=1&ClientID=101&TagId=200

Instead of that url, i want to /RedirectionURL.aspx?1.101.200 this url

int Bid = Convert.ToInt32(Request.QueryString.Get("BatchID"));
int Cid = Convert.ToInt32(Request.QueryString.Get("ClientID"));
string Tno = Request.QueryString.Get("TagId");

Mandlaa, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response