zimcoder Level: VB Lord

 Registered: 27-10-2003 Posts: 225
|
Re: how to pass encrypted query string ?
Here is how to pass an encrypted query using Server.UrlEncode NB// code in c#
<%@ Page Language="c#" %>
<html>
<body>
<%;
string Name ="Clement";
string age = "Twenty five and 11 months, 25 days";
Name = Server.UrlEncode(Name);
Age = Server.UrlEncode(Age);
%>
<a href="mybithday2.aspx?name=<% Response.Write(Name);%>&age=<% Response.write(Age); %>">Click here</a>
</body>
</html> |
You can name this file myBirthday1.aspx
Here is mybirthday2.aspx that recieves the data
<@ Page Language="c#" %>
<html>
<body>
<%;
string Name =Request.QueryString["Name"]";
string age = Request.QueryString["Age"];
%>
<h1>Happy Birthday <%Response.Write(Name); %></h1>
<h3>May the Next <% Response.Write(Age); %> years be Good!</h3>
</body>
</htm> |
This should give a staring point.. Good Luck!
____________________________
BrainBench ADO.NET and ASP.NET Certified Developer
 
|