Click here to Skip to main content
15,914,327 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionconverting from vs2003 to vs2005 Pin
Shaimmaa29-Jan-07 22:27
Shaimmaa29-Jan-07 22:27 
AnswerRe: converting from vs2003 to vs2005 Pin
badgrs29-Jan-07 23:51
badgrs29-Jan-07 23:51 
QuestionButton Click when 'Enter' key is pressed Pin
Vsree29-Jan-07 22:16
Vsree29-Jan-07 22:16 
AnswerRe: Button Click when 'Enter' key is pressed Pin
Vasudevan Deepak Kumar29-Jan-07 22:22
Vasudevan Deepak Kumar29-Jan-07 22:22 
GeneralRe: Button Click when 'Enter' key is pressed Pin
Vsree29-Jan-07 22:28
Vsree29-Jan-07 22:28 
GeneralRe: Button Click when 'Enter' key is pressed Pin
blue_arc30-Jan-07 0:18
blue_arc30-Jan-07 0:18 
GeneralRe: Button Click when 'Enter' key is pressed Pin
Vsree30-Jan-07 0:36
Vsree30-Jan-07 0:36 
QuestionHow to edit and Update the DridView Values. Pin
slSoftware29-Jan-07 21:37
slSoftware29-Jan-07 21:37 
I have created application that have gridview for view the details in the page load it self,I’ve puted the command field for edit,update,cancel the data,my codings are as follows for each an even of command field.(RowEditing,RowUpdating)

protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = (int)e.NewEditIndex;
BindGrid();
}

protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
String updateCmd = "UPDATE College_Sa SET cName = @Name, cState = @State where cCode = @ID";

SqlCommand myCommand = new SqlCommand(updateCmd, mycon);

myCommand.Parameters.Add(new SqlParameter("@ID", SqlDbType.Char, 11));
myCommand.Parameters.Add(new SqlParameter("@Name", SqlDbType.Char, 25));
myCommand.Parameters.Add(new SqlParameter("@State", SqlDbType.Char, 25));


myCommand.Parameters["@Name"].Value = GridView1.Rows[int.Parse(e.RowIndex.ToString())].Cells[3].Text.ToString(); ;
myCommand.Parameters["@State"].Value = GridView1.Rows[int.Parse(e.RowIndex.ToString())].Cells[4].Text.ToString();

myCommand.Connection.Open();
try
{
myCommand.ExecuteNonQuery();
GridView1.EditIndex = -1;
}
catch (SqlException exc)
{
Label2.Text = "Error while entering data into database " + exc;
Label2.Visible = true;
}

myCommand.Connection.Close();

BindGrid();

}
In the BindGrid(),my problem is when I click update button Value of Name and State fields are not taking my new values.pls help me to solve this problem.
Thank You

AnswerRe: How to edit and Update the DridView Values. Pin
Vasudevan Deepak Kumar29-Jan-07 21:38
Vasudevan Deepak Kumar29-Jan-07 21:38 
GeneralRe: How to edit and Update the DridView Values. Pin
slSoftware29-Jan-07 22:08
slSoftware29-Jan-07 22:08 
Questionhow to check the email id is valid... Pin
Eswara Moorthi29-Jan-07 21:34
Eswara Moorthi29-Jan-07 21:34 
AnswerRe: how to check the email id is valid... Pin
Vasudevan Deepak Kumar29-Jan-07 21:37
Vasudevan Deepak Kumar29-Jan-07 21:37 
AnswerRe: how to check the email id is valid... Pin
vimal_yet29-Jan-07 21:53
vimal_yet29-Jan-07 21:53 
GeneralRe: how to check the email id is valid... Pin
Vasudevan Deepak Kumar29-Jan-07 21:59
Vasudevan Deepak Kumar29-Jan-07 21:59 
GeneralRe: how to check the email id is valid... Pin
Eswara Moorthi29-Jan-07 22:00
Eswara Moorthi29-Jan-07 22:00 
GeneralRe: how to check the email id is valid... Pin
Christian Graus29-Jan-07 22:04
protectorChristian Graus29-Jan-07 22:04 
GeneralRe: how to check the email id is valid... Pin
Vasudevan Deepak Kumar29-Jan-07 22:20
Vasudevan Deepak Kumar29-Jan-07 22:20 
Questionabout session handling Pin
Eswara Moorthi29-Jan-07 21:25
Eswara Moorthi29-Jan-07 21:25 
AnswerRe: about session handling Pin
Vasudevan Deepak Kumar29-Jan-07 21:31
Vasudevan Deepak Kumar29-Jan-07 21:31 
GeneralRe: about session handling Pin
Eswara Moorthi29-Jan-07 21:37
Eswara Moorthi29-Jan-07 21:37 
GeneralRe: about session handling Pin
Vasudevan Deepak Kumar29-Jan-07 21:46
Vasudevan Deepak Kumar29-Jan-07 21:46 
QuestionError writing to the exceptioj log file. Pin
irkahc29-Jan-07 20:44
irkahc29-Jan-07 20:44 
AnswerRe: Error writing to the exceptioj log file. Pin
Sylvester george29-Jan-07 21:00
Sylvester george29-Jan-07 21:00 
AnswerRe: Error writing to the exceptioj log file. Pin
Vasudevan Deepak Kumar29-Jan-07 21:33
Vasudevan Deepak Kumar29-Jan-07 21:33 
Question'unhandled win32 exception' has occured in IEXPLORE.EXE Pin
isaii29-Jan-07 20:34
isaii29-Jan-07 20:34 

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.