QueryString in asp.net Part 59

preview_player
Показать описание
Text version of the video

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.

Slides

All ASP .NET Text Articles

All ASP .NET Slides

All Dot Net and SQL Server Tutorials in English

All Dot Net and SQL Server Tutorials in Arabic

Different techniques to move data from one webform to another
1. Cross Page Postback: Discussed in Part 55 and Part 56
2. Context.Handler object - Discussed in Part 58
3. Query strings - Will be discussed in this session.

The following concepts will be discussed in the subsequent sessions
4. Cookies
5. Session state
6. Application state

Points to remember about query strings
1. Querystrings are name/value collection pairs
2. Using querystrings, is a very comman way to send data from one webform to another.
3. Query strings are appended to the page URL.
4. ?(Question Mark), indicates the beginning of a query string and it's value.
5. It is possible to use more than one query string. The first query string is specified using the ?(question mark). Subsequent query strings can be appended to the URL using the &(ampersand) symbol.
6. There is a limit on the Query string length. Hence, Query strings cannot be used to send very long data.
7. Query strings are visible to the user, hence should not be used to send sensitive information, unless encrypted.
8. To read the query string value, use Request object's QueryString property.
9. &(ampersand) is used to concatenate query strings, so if you want to send &, as value for the query string there are 2 ways, as shown below
Using Server.UrlEncode() method
"&UserEmail=" + Server.UrlEncode(txtEmail.Text));

Or
&(ampersand) is encoded as %26, so use, Replace() function to replace & with %26
"&UserEmail=" + txtEmail.Text.Replace("&", "%26"));
Рекомендации по теме
Комментарии
Автор

A fantastic tutorial again! I found QueryStrings so scary in my work back then, but now I understand them, and there is no problem with them.
Short additional info: the maximum length of URL is ~2000 characters.

Trzbne
Автор

Hi, thank you very much for taking time to give feedback. I am really glad you found these videos useful. To receive email alerts, when new videos are uploaded, please subscribe to my youtube channel. May I ask you for a favour. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them. If you like these videos, please click on the THUMBS UP button below the video.

Csharp-video-tutorialsBlogspot
Автор

Thank you for all these videos! I play them at 2x speed and it's awesome :D

ElTorroXL
Автор

Thanks Venkat for another excellent video.

indurnuguri
Автор

Good one this also.This video also cleared my concept ..Keep it up sir.Thank you.

Pulaha
Автор

i really like your videos its concise and well explained.

TheMFMLive
Автор

these video are very useful to me...thanku sir

lathakumari
Автор

again amazing tutorial... thank you very much

mehtarahul
Автор

Good videos thank you for posting them

paddyrelangi
Автор

Sir from where did u learned so many things..???

shoaibrazaDeshmukh
Автор

Sir, This is an awesome video. I have one question is that "What is limit of the query string?"

SurajSurve
Автор

sir, in place of response.redirect can we use server.transfer

immanuveledison
Автор

What is the best way to post the data to the external destination URL?

jinnybat
Автор

Hi Naresh, Request.Form["variable_name"] gets form collection variables and the not query strings.

Csharp-video-tutorialsBlogspot
Автор

can't we use request.form instead of request.querystring? if I am missing something, sir can u plz explain where exactly we to use request.form and request.querystring?

nareshchennoj
Автор

Sir please tell me how to generate and pass id in same page

neenathomas
Автор

Hi Shan, query strings are part of URL. Using from a user control should read the query string value. Hope this answers your question. To receive email alerts, when new videos are uploaded, please subscribe to my youtube channel. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends who you think would also benefit from them. If you like these videos, please click on the THUMBS UP button below the video.

Csharp-video-tutorialsBlogspot
Автор

I want to send data to same page how can it is possible

sarinkumarpatle
Автор

Hello Sir, how to pass data from query String from one page to another to avoid Open Redirect Vunerabililty attacks.

akash
Автор

I have a problem for Crystal Report in ASP.net using Visual Studio 2012 please help me

shaficicabdi
join shbcf.ru