How to work with Query String?

Posted by Shameer.Ali87 under ASP.NET on 8/25/2012 | Points: 10 | Views : 1035 | Status : [Member] | Replies : 3
I am supposed to create multiple pages to pass the value and titles for the corresponding values...
so Instead of create multiple pages, I can hold the value and its title, and in turn I can make the value and its title sit in the same place of only one page...

can any one explain me the above using a query string..

shameer ali shaik


Responses

Posted by: Johnbhatt on: 8/26/2012 [Member] Starter | Points: 25

Up
0
Down
I am little confused or can't get your question clearly.

However, if you want to Keep the Title Same for Multiple Pages, just make use of Masterpage and keep title blank in Content Pages. But I think this is not the situation.

Please make it clear with an illustrating example. Will try to help.

John Bhatt
Glad to Know, Free to Share.....
http://www.johnbhatt.com

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

Posted by: Shameer.Ali87 on: 8/27/2012 [Member] Starter | Points: 25

Up
0
Down
hi john,

I am designing a website similar to you tube, so in that i have 5 videos,
so for each video i have given different pages as(page1, page2...,page5), so that each video plays in separate page..

I have given the links for all the videos from the main page(default.aspx)..
here, with the above scenario, everything is fine its working well...

but now Iam trying to do the same concept using query string. So that I have only one page and I can just change the
video ID and title of that Video using Query String...

that's it.. any help regarding Query String will be thankfull...



shameer ali shaik

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

Posted by: Johnbhatt on: 8/27/2012 [Member] Starter | Points: 25

Up
0
Down
OK, this is the exactly what I wanted to understand.

You can pass the Query from any page to Video Player Page and want to Embed file from Query String inside Player.

Do following tasks on Page Load event.

Query Details of Mentioned VideoID from Database. Like URL, Video Title for Page Title etc.

ex.
int VidID="";
if(Request.QueryString!=null)
{
VidID = Convert.ToInt(Request.QueryString.ToString());

//sqlconnection and get details according to VidID;

//then Pass the URL of Video to Player.

//Change the Title of Browser : this.Title = ds.table[0].Rows[0][2].ToString() + " - My Video Community";
}

This code is not coded at VS, so change some basis if some mistakes.

John Bhatt
Glad to Know, Free to Share.....
http://www.johnbhatt.com

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

Login to post response