Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
GridView.DataBind();
TextBox UserName = (TextBox)GridView.Rows[e.RowIndex].FindControl("TextBox1");
TextBox Password = (TextBox)GridView.Rows[e.RowIndex].FindControl("TextBox2");
Label lbl= (Label)GridView.Rows[e.RowIndex].FindControl("Label2"); 
       SqlDataSource1.UpdateCommand = "Update UserDetails Set UserName='" + UserName.Text + "', Password='" + Password.Text + "' where Exi_ID=" + lbl.Text + " And Edition_Id=" + Session["Edition_ID"].ToString() + "";   


Issue is here:-

SqlDataSource1.UpdateCommand = "Update UserDetails Set UserName='" + UserName.Text + "', Password='" + Password.Text + "' where Exi_ID=" + lbl.Text + " And Edition_Id=" + Session["Edition_ID"].ToString() + "";


when i am trying to update then it is not updating
For example i am trying to update pass from 12345 to 1234567 then in "Password.Text" it is showing the old value only

What I have tried:

I have not tried anything. can anyone please help me for it
Posted
Updated 8-Aug-17 22:51pm
v2
Comments
Richard Deeming 9-Aug-17 11:40am    
And why are you re-inventing the wheel? ASP.NET has several perfectly good authentication systems built-in - for example, ASP.NET Identity[^]
Sinisa Hajnal 10-Aug-17 8:47am    
If there was a way I would upvote all three comments. :) good work Richard!
Original poster: stop immediately or you'll make the system that will be wide open to all sorts of hacks and damage. Read offered links and start over.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900