Click here to Skip to main content
16,004,919 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to fetch contiguous numbers from a string Pin
Guffa6-Nov-07 9:57
Guffa6-Nov-07 9:57 
QuestionMessage box in C# [modified] Pin
Deepak Koduri6-Nov-07 6:30
Deepak Koduri6-Nov-07 6:30 
AnswerRe: Message box in C# Pin
Guffa6-Nov-07 7:52
Guffa6-Nov-07 7:52 
GeneralRe: Message box in C# Pin
Deepak Koduri15-Nov-07 19:52
Deepak Koduri15-Nov-07 19:52 
GeneralRe: Message box in C# Pin
Guffa15-Nov-07 20:39
Guffa15-Nov-07 20:39 
QuestionReadonly Gridview Pin
kjosh6-Nov-07 5:43
kjosh6-Nov-07 5:43 
AnswerRe: Readonly Gridview Pin
John-ph6-Nov-07 21:45
John-ph6-Nov-07 21:45 
Questionhow to update a row in data grid ?? [modified] Pin
rocky8116-Nov-07 4:51
rocky8116-Nov-07 4:51 
i am trying to update row in table (data grid ) but unable to do it .. this is what i have done so far ..

protected void UpdateCommand(object source, DataGridCommandEventArgs e)
{
Response.Write("testing");

SqlConnection conn = new SqlConnection(connectionString);
try
{
conn.Open();
string database1 = "Level1";
TextBox UserName = (TextBox)(e.Item.Cells[2].Controls[0]);
TextBox MacAddr = (TextBox)(e.Item.Cells[3].Controls[0]);
DataSet ds = new DataSet();
SqlCommand myCommand = new SqlCommand("UPDATE " + database1 +
" SET UserName = '" + UserName +
"', MacAddr = '" + MacAddr+" ' ", conn);

myCommand.Connection = conn;
myCommand.ExecuteNonQuery();
}
catch (Exception ex)
{
Response.Write(ex.Message);
Response.End();
if (conn != null) conn.Close();
return;
}
finally
{
Response.Redirect((string)Session["PreviousURL"]);
}

conn.Close();
DataGrid1.EditItemIndex = -1;

can someone help me how to update after we clik edit button in each textbox in a row ??

Thanx !!


-- modified at 11:39 Tuesday 6th November, 2007
AnswerRe: how to update a row in data grid ?? Pin
John-ph6-Nov-07 5:14
John-ph6-Nov-07 5:14 
GeneralRe: how to update a row in data grid ?? Pin
rocky8116-Nov-07 5:20
rocky8116-Nov-07 5:20 
GeneralRe: how to update a row in data grid ?? Pin
John-ph6-Nov-07 5:25
John-ph6-Nov-07 5:25 
GeneralRe: how to update a row in data grid ?? Pin
rocky8116-Nov-07 5:30
rocky8116-Nov-07 5:30 
GeneralRe: how to update a row in data grid ?? Pin
John-ph6-Nov-07 19:21
John-ph6-Nov-07 19:21 
QuestionFormView Problem ASP.NET 2005 Pin
Haridas.R6-Nov-07 4:20
Haridas.R6-Nov-07 4:20 
AnswerRe: FormView Problem ASP.NET 2005 Pin
Rocky#6-Nov-07 4:42
Rocky#6-Nov-07 4:42 
QuestionAjax control toolkit tabcontainer - not rendered Pin
digsy_6-Nov-07 3:40
digsy_6-Nov-07 3:40 
QuestionSorting in a GridView Without Databinding Pin
Rocky#6-Nov-07 3:23
Rocky#6-Nov-07 3:23 
AnswerRe: Sorting in a GridView Without Databinding Pin
John-ph6-Nov-07 4:01
John-ph6-Nov-07 4:01 
GeneralRe: Sorting in a GridView Without Databinding Pin
Rocky#6-Nov-07 4:07
Rocky#6-Nov-07 4:07 
GeneralRe: Sorting in a GridView Without Databinding Pin
Rocky#6-Nov-07 4:40
Rocky#6-Nov-07 4:40 
GeneralRe: Sorting in a GridView Without Databinding Pin
John-ph6-Nov-07 4:58
John-ph6-Nov-07 4:58 
QuestionIs Possible to show a youtube video in to aspx page?? Pin
bijeshputhalath6-Nov-07 2:32
bijeshputhalath6-Nov-07 2:32 
AnswerRe: Is Possible to show a youtube video in to aspx page?? Pin
Michael Sync6-Nov-07 3:47
Michael Sync6-Nov-07 3:47 
GeneralRe: Is Possible to show a youtube video in to aspx page?? Pin
bijeshputhalath6-Nov-07 18:13
bijeshputhalath6-Nov-07 18:13 
GeneralRe: Is Possible to show a youtube video in to aspx page?? Pin
Michael Sync6-Nov-07 18:31
Michael Sync6-Nov-07 18:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.