Archive for October, 2010

Find row index of gridview on RowCommand without CommandArgument

Gridview has a template field with item linkbutton delete with CommandName now when user click on linkbutton then find the rowindex on Rowcommand event of gridview using C#.net protected void grdtest1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == “DeleteRow”) { LinkButton gv = (LinkButton)e.CommandSource; GridViewRow gvr = (GridViewRow)gv.Parent.Parent; int rownum = gvr.RowIndex; } }

Replace enter key value from textbox using asp.net with c#.net and save in database

Problem: when I wants save multiline textbox value in database using asp.net with c#.net and show as it is its not happening …. Actually the problem is when we enter the value in textbox and press enter key. value like this this is jack web developer it save in database but when fetch value from [...]