How To Use Query Strings In Asp Net,Donna Hogan 2012 Bianco Nero Interactive Scarpe outlet online
There are different ways to transfer data from one page to another in ASP.NET.
A few means to transfer data between pages in asp.net are:
1.Using session variables;
2.Using view state variable;
3.Using class variables;
4.Using query strings;
Transferring information using Query strings is typically not recommended for reasons of security,Mbt Nafasi Mid Schuhe schwarz WoMänner, but sometimes we have no choice but to use it. This is Particularly true in the following cases:
1.When we want to transfer information from a page in one site to a page located in another site;
2.When we want to pass information from an ASP.NET page to another page in the same site that is not written in ASP.NET.
3.In addition,The Title of My Website, we can use Query strings when we develop in an environment where security considerations are secondary. Such as intra-net environment or an environment where there is no meaning to permissions and security of data transferred from page to page.
The code we write on the sender would look like this:
' Send data to another page with Query string
Please note that immediately after the name of the page to which we send the information to we need to add a question mark '?' And then the name of the variable (in our case 'field1') and then an equal sign '=' and the value of the field that we send. If we want to send more data then we need to put '&' before every pair of fields and values.
The code we write in order to receive the data that was sent to a page will look like this:
' Get data from Query string
Dim sVal1 as String = Request.Querystring(Field1)
Dim sVal2 as String = Request.Querystring(Field2)
Please note: In order to transfer data from site to site we can also use Response.Redirect. 相关的主题文章:
订阅:
博文评论 (Atom)
没有评论:
发表评论