Click here to Skip to main content
15,881,172 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Want To Bind Data To HTML Control Pin
Gamzun5-Nov-09 0:03
Gamzun5-Nov-09 0:03 
GeneralRe: Want To Bind Data To HTML Control Pin
FEMDEV5-Nov-09 1:36
FEMDEV5-Nov-09 1:36 
QuestionHow to cutomise a Usercontrol Solved [modified] Pin
alaminfad4-Nov-09 20:57
alaminfad4-Nov-09 20:57 
AnswerRe: How to cutomise a Usercontrol Pin
Abhishek Sur4-Nov-09 21:00
professionalAbhishek Sur4-Nov-09 21:00 
GeneralRe: How to cutomise a Usercontrol Pin
FEMDEV4-Nov-09 23:55
FEMDEV4-Nov-09 23:55 
GeneralRe: How to cutomise a Usercontrol Pin
alaminfad7-Nov-09 19:34
alaminfad7-Nov-09 19:34 
GeneralRe: How to cutomise a Usercontrol Pin
Abhishek Sur8-Nov-09 1:47
professionalAbhishek Sur8-Nov-09 1:47 
QuestionHow to redirect Url Dynamically Pin
Hari19194-Nov-09 20:33
Hari19194-Nov-09 20:33 
Hi,
I have two pages in my website 1.Welcome.aspx 2.Search.aspx

Welcome.aspx has two text boxes. Keyword and Location
User types in keyword and Location and clicks Search button

User gets redirected to search.aspx page
The values of Keyword and Location is stored in session and these values are utilized in Pageload to show the values in grid in search.aspx page.

Hence the url of this page is always http://sitename/search.aspx

However in order to get higher rating using SEO methods I plan to include the
keyword and location in url like http://sitename/search.aspx/keyword/Location

How can this be done? is it possible to read values stored in session and modify the url dynamically?

WelcomePage Code
-------------------------------------------------------------
protected void On_btnSearch_Click(object sender, ImageClickEventArgs e)
{

Session["searchWord"] = txtSearchWords.Text;
Session["location"] = txtLocation.Text;
Response.Redirect("Search.aspx");
}
--------------------------------------------------------------



SearchPageCode
--------------------------------------------------------------
protected void Page_Load(object sender, EventArgs e)
{

if (!Page.IsPostBack)
{

//Receiving the searchWords from the calling pages.
if (Session["searchWord"] == null)
{
Server.Transfer("Welcome.aspx");
}
else
{
txtSearchWords.Text = Session["searchWord"].ToString();
txtLocation.Text = Session["location"].ToString();

Session.Remove("searchWord");
Session.Remove("location");
}


if (!txtSearchWords.Text.Equals(""))
{

grdResultRefresh();

}

}
--------------------------------------------------------
AnswerRe: How to redirect Url Dynamically Pin
Abhishek Sur4-Nov-09 21:35
professionalAbhishek Sur4-Nov-09 21:35 
GeneralRe: How to redirect Url Dynamically Pin
Nishant Singh5-Nov-09 0:09
Nishant Singh5-Nov-09 0:09 
QuestionDo I need to call return statement after a Response.Redirect method ? Pin
Nadia Monalisa4-Nov-09 20:24
Nadia Monalisa4-Nov-09 20:24 
AnswerRe: Do I need to call return statement after a Response.Redirect method ? Pin
padmanabhan N4-Nov-09 21:23
padmanabhan N4-Nov-09 21:23 
AnswerRe: Do I need to call return statement after a Response.Redirect method ? Pin
m@dhu4-Nov-09 21:55
m@dhu4-Nov-09 21:55 
AnswerRe: Do I need to call return statement after a Response.Redirect method ? Pin
Nishant Singh5-Nov-09 0:01
Nishant Singh5-Nov-09 0:01 
AnswerRe: Do I need to call return statement after a Response.Redirect method ? Pin
sandamalsilva5-Nov-09 5:54
sandamalsilva5-Nov-09 5:54 
GeneralRe: Do I need to call return statement after a Response.Redirect method ? Pin
Nadia Monalisa5-Nov-09 12:20
Nadia Monalisa5-Nov-09 12:20 
Questionquery Pin
mylogics4-Nov-09 20:20
professionalmylogics4-Nov-09 20:20 
AnswerRe: query Pin
SeMartens4-Nov-09 20:22
SeMartens4-Nov-09 20:22 
GeneralRe: query Pin
mylogics4-Nov-09 20:26
professionalmylogics4-Nov-09 20:26 
GeneralRe: query Pin
SeMartens4-Nov-09 20:28
SeMartens4-Nov-09 20:28 
GeneralRe: query Pin
mylogics4-Nov-09 21:06
professionalmylogics4-Nov-09 21:06 
GeneralRe: query Pin
SeMartens4-Nov-09 21:14
SeMartens4-Nov-09 21:14 
AnswerRe: query Pin
FEMDEV4-Nov-09 23:58
FEMDEV4-Nov-09 23:58 
Questionhow to replace null in SQL left join? Pin
Subin Mavunkal4-Nov-09 19:34
Subin Mavunkal4-Nov-09 19:34 
AnswerRe: how to replace null in SQL left join? Pin
dan!sh 4-Nov-09 20:19
professional dan!sh 4-Nov-09 20:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.