Rowupdating get textbox value

6854933580_2c8b688306_z

Now we access this connection string on the page so we can open a connection with the relation database. The first one accesses the connection string and the other is for the SQL connection.

Now we define a method for opening a connection with the relation database and returns a SQL connection object depending on the connection string that is passed as a parameter of the Sql Connection class constructor.

Please help me with writing a Row Updating function in C#, I don't know how to grab the current field's value and also get the old value for one of keys (which is Project Name for editing) of the selected row. the idea wa to don't allow binding the grid view after a post back.

Upon modifying the values in textbox which come from Edit Item Template , the new values dont show in the event handler rowupdating(), instead I get the values which appear when the page was rendered. Steve The Row Updating method has a variable that is of type Grid View Update Event Args and has two properties that may interest you: Old Values and New Values. event is raised when a row's Update button is clicked, but before the Grid View control updates the row. Connection = conn2 sql = "SET DATEFORMAT dmy; SELECT * FROM XXXX " cmd. Execute Reader() Dim Temp Staff Key As Integer Dim Temp Post Key As Integer Dim Temp Shift Date As Date Time Dim Temp Start Time As Date Time Dim Temp End Time As Date Time Dim Temp SL As String Dim Temp Roster Key As Integer Dim Temp VL As String Dim Temp ML As String Dim Temp PH As String Dim Temp APH As String Dim Temp TOIL As String Dim Temp Others As String Dim Temp Shift Type As Integer Dim Temp Submitted By As Integer Dim dt As New Data Table() dt. Add(New Data Column("Staff Name", Get Type(String))) dt. Add(New Data Column("Post Code", Get Type(String))) dt. Add(New Data Column("Staff Key", Get Type(Int32))) dt. Add(New Data Column("Post Key", Get Type(Int32))) 'Monday dt. Add(New Data Column("Col1_Roster Key", Get Type(Int32))) dt. Add(New Data Column("Col1_Shift Date", Get Type(Date Time))) dt. Add(New Data Column("Col1_Start Time", Get Type(Date Time))) dt. Add(New Data Column("Col1_End Time", Get Type(Date Time))) dt. Add(New Data Column("Col1_SL", Get Type(String))) dt. Add(New Data Column("Col1_VL", Get Type(String))) dt. How do I grab the new values from these textboxes and proceed further?

You must have an account to comment. Please register or login here!