Querystring | Session |
---|---|
Querystring is client side state management technique. | Session is server side state management technique. |
Querystring data is page specific i.e. can be accessed in that page only. | Session data can be accessed throughout the session. |
Querystring data is visible to user and can be seen in browser url. | Session data is not visible to user. |
Data is not secured and can be altered hence insensitive data is stored in querystring. | Data is secured hence sensitive data such as user information is stored. |
Querystring has constraint of Maxlength. | Session does not have such constraint. |
Difference between Query string and Cookies
cookies is a text file stored on client machine when we surf ant thing on internet by the server automatically we dont have to create itquery string is used to transfer data from 1 page to anothe but this is not safe s it shows in url what data we r sending
pen any site and see url after question mark tht is url
Cookies: - Cookies are little pieces of information that a server stores on a browser. They are of two types
1. Temporary cookie
2. Persistent cookie
Temporary cookie: - They are also known as session cookies. These are volatile in nature. When the browser is shutdown they are erased.
Persistent cookie:- These may be called as permanent cookies. These are especially saved in files. It may remain for a month or year.
Properties of cookies
Some properties of cookie
Name: - represent the name of cookie.
Name value: - represent a collection of key values of cookie
Domain: - represent the domain associated with a specific cookie.
Path: - the path associated with a cookie.
Expires: - expired time of cookie.
Hashkey: - identifies whether the cookie is a cookie dictionary.
Secure: - specifies whether the cookie is to be sent in an encrypted connection or not
Query string is the limited way to pass information to the web server while Transferring from one page to another page. This information is passed in url of the request. see below the code sample
Code Sample
//Retrieving values from query string
String name;
//Retrieving from query string
name = Request.Param["umar"].ToString();
But remember that many browsers impose a limit of 255 characters in query strings. You need to use HTTP-Get method to post a page to server otherwise query string values will not be available.
Difference between Session and Cookies
The basic and main difference between cookie and session is that cookies are stored in the user's browser but sessions can't store in user's browser. This specifies which is best used for.• A cookie can keep all the information in the client's browser until deleted. If a person has a login and password, this can be set as a cookie in their browser so they do not have to re-login to your website every time they visit. You can store almost anything in a browser cookie.
• Sessions are not reliant on the user allowing a cookie. They work like a token in the browser which allowing access and passing information while the user has opened his browser. The problem in sessions is when you close the browser the session will automatically lost. So, if you had a site requiring a login, this couldn't be saved as a session but it can be saved as a cookie, and the user has to re-login every time they visit.
• Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating. Power Bi Online COURSE
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks for your informative article.Nice explantion query string and cookies.Really understable. ASP.NET MVC Training in Chennai
ReplyDeleteSalama Aleikum,
ReplyDeleteThank you! Thank you! Thank you! Your blog was a total game changer!
i've manage to use reportwriter to generate PDF from a rdlc that contain no subreport. ASP .Net
But i got error when using rdlc with subreport in it. Do you have any code example for this case?
I read multiple articles and watched many videos about how to use this tool - and was still confused! Your instructions were easy to understand and made the process simple.
Kind Regards,
Radhey
The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
ReplyDeleteSelenium training in Chennai
Selenium training in Bangalore
Selenium training in Pune
Selenium Online training
Thank you for taking time to provide us some of the useful and exclusive information with us.
ReplyDeleteRegards,
selenium course in chennai
SVR Technologies provide Mulesoft Training with Mulesoft Video Tutorials, Live Project, Practicals - Realtime scenarios, CV, Interview and Certification Guidance.
ReplyDeleteEnquire Now: +91 9885022027
Enroll Now: https://bit.ly/2OCYVgv
https://svrtechnologies.com/contact-us/
It's Incredibly grand. Really very helpful article , Thank you for sharing
ReplyDeleteWorkday HCM Online Training
vidmate app
ReplyDeleteCongratulations This is the great things. Thanks to giving the time to share such a nice information.best Mulesoft training in bangalore
ReplyDeleteVery useful and information content has been shared out here, Thanks for sharing it.Mulesoft training in bangalore
ReplyDeleteThanks for Sharing Such an Informative Post..
ReplyDeleteamazon web services tutorial
I gathered a lot of information through this article.Every example is easy to undestandable and explaining the logic easily.python training in bangalore
ReplyDeleteI am happy for sharing on this blog its awesome blog I really impressed. thanks for sharing. Great efforts.
ReplyDeleteStart your journey with SAP S4 HANA Simple Logistics Training in Bangalore and get hands-on Experience with 100% Placement assistance from experts Trainers @Softgen Infotech Located in BTM Layout Bangalore. Expert Trainers with 8+ Years of experience, Free Demo Classes Conducted.
Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, data science training because you have explained the concepts very well. It was crystal clear, keep sharing..
ReplyDeleteNice Blog...Thanks for sharing the information...
ReplyDeleteservicenow training in bangalore
Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
ReplyDeletelearn hadoop online
ReplyDeleteI am very happy when read this blog post because blog post written in good manner and write on good topic. Thanks for sharing valuable information about Data Science course.
Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery
Very interesting blog.Thanks for sharing this much valuable information.Keep Rocking.
ReplyDeletedevops training in chennai | devops training in anna nagar | devops training in omr | devops training in porur | devops training in tambaram | devops training in velachery
I am feeling grateful to read this.you gave a nice info for us.please update more.
ReplyDeleteWeb Designing Training Course in Chennai | Certification | Online Course Training | Web Designing Training Course in Bangalore | Certification | Online Course Training | Web Designing Training Course in Hyderabad | Certification | Online Course Training | Web Designing Training Course in Coimbatore | Certification | Online Course Training | Web Designing Training Course in Online | Certification | Online Course Training
Very interesting blog Thank you for sharing such a nice and interesting blog and really very helpful article.
ReplyDeletePentaho Online Training
Pentaho Classes Online
Pentaho Training Online
Online Pentaho Course
Pentaho Course Online
Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
ReplyDeleteSAP HANA Online Training
SAP HANA Classes Online
SAP HANA Training Online
Online SAP HANA Course
SAP HANA Course Online
I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.
ReplyDeleteTableau certification Online Training in bangalore
Tableau certification courses in bangalore
Tableau certification classes in bangalore
Tableau certification Online Training institute in bangalore
Tableau certification course syllabus
best Tableau certification Online Training
certification Online Training centers
Excellent post, thanks for this. I gathered lots of information from this and I am happy about it. Do share more updates.
ReplyDeleteAWS training in Chennai
AWS Online Training in Chennai
AWS training in Bangalore
AWS training in Hyderabad
AWS training in Coimbatore
AWS training
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
ReplyDeleteDevOps Training in Chennai
DevOps Course in Chennai
good information free instagram followers
ReplyDelete