Hi friends...
How do i encrypt the querystring URL while redirecting to other pages...pls go through my code
Design Page
<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
<a href="QueryStringApplication.aspx?id=<%#Eval("id") %>">
<asp:Label ID="lblEditt" runat="server" Text="Edit"></asp:Label>
</a>
</ItemTemplate>
</asp:TemplateField>
.cs
//Page Load
if (Request.QueryString["id"] != null)
{
Edits();
}
UDF
protected void Edits()
{
int id = Convert.ToInt32(Request.QueryString["id"].ToString());
SqlConnection cnn = new SqlConnection(Conn);
SqlCommand cmd = new SqlCommand("sp_NameAgeById", cnn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@id", id);
SqlDataAdapter ada = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
ada.Fill(ds);
txtName.Text = ds.Tables[0].Rows[0]["Name"].ToString();
txtAge.Text = ds.Tables[0].Rows[0]["Age"].ToString();
}
Join Hands Change lives
Thanks & Regards
Straight Edge Society