SHARE
TWEET

Untitled

a guest Apr 12th, 2019 159 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. default.aspx :  
  2.    <asp:Button Text="Submit" runat="server" OnClick="RegisterUser"  postbackurl="userinfo.aspx"/>
  3.  
  4. default.aspx.cs :  
  5.     private void Button1_Click(object sender, System.EventArgs e)
  6.     {
  7.         Session["username"] = txtUsername.Text;
  8.         Response.Redirect("userinfo.aspx", false);
  9.        
  10.     }
  11.  
  12.  
  13.  
  14. userinfo.aspx.cs :
  15. string a = Session["username"].ToString();
  16. scmd.CommandText = "SELECT * FROM registered where username = @a";
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top