Click here to Skip to main content
15,915,164 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionThe transport failed to connect to the server. Pin
LucBite26-May-09 7:33
LucBite26-May-09 7:33 
AnswerRe: The transport failed to connect to the server. Pin
alexito196526-May-09 7:45
alexito196526-May-09 7:45 
AnswerRe: The transport failed to connect to the server. Pin
Manas Bhardwaj26-May-09 10:32
professionalManas Bhardwaj26-May-09 10:32 
QuestionHi - Why does the javascript in this asp.net tutorial not work in firefox 3? Pin
hardboy11126-May-09 7:11
hardboy11126-May-09 7:11 
AnswerRe: Hi - Why does the javascript in this asp.net tutorial not work in firefox 3? Pin
sarang_k26-May-09 16:42
sarang_k26-May-09 16:42 
Questiondesigner generated hidden code Pin
bolly-8126-May-09 6:54
bolly-8126-May-09 6:54 
AnswerRe: designer generated hidden code Pin
Manas Bhardwaj26-May-09 10:34
professionalManas Bhardwaj26-May-09 10:34 
Questiongridview binding Pin
jainiraj26-May-09 6:51
jainiraj26-May-09 6:51 
I have add check box in a gridview in eachh row at run time.I have a delete button on page.If it is clicked then all checkbox are checed if true yhen delete corresponding row.I have use Template column for checkbox.and bind an id with it.On running page this id is also visible but i want to do invisible it.also how can i retrieve this id if checkbox is checked.
here is code...


protected void Page_Load(object sender, EventArgs e)
{
query="select brok.*,cust.FirstName+' '+cust.LastName as Name from brokermsgrecieved as brok,custdetails as cust where brok.BrokerId='"+Session["broker"]+"' and cust.CustId=brok.FromCustId";
dt = obj.select(query);

GridView1.DataSource=dt;
GridView1.DataBind();
}

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
CheckBox chk = new CheckBox();
e.Row.Cells[0].Controls.Add(chk);


if (e.Row.Cells[1].Text == "True")
{

e.Row.BackColor = Color.Wheat;
}

if (e.Row.Cells[1].Text == "False")
{
e.Row.BackColor = Color.WhiteSmoke;
}


}
protected void Button1_Click(object sender, EventArgs e)
{
GridView1.DataSource = dt;
GridView1.DataBind();
Int16 count =(Int16) GridView1.Rows.Count;
for (Int16 i = 1; i < count; i++)
{
CheckBox chk = (CheckBox)GridView1.Rows[i].Cells[0].Controls[1];
if (chk.Checked.Equals(true))
{
//query="Delete from brokermsgrecieved where "
//GridView1.Rows[i].Cells[0].v
query = "delete from brokermsgrecieved where MsgId='1'";
obj.insert(query);
}
}
}

here is code such that i bind id----


<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False"
="" width="611px" onrowdatabound="GridView1_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<%# Eval("MsgID") %>
</ItemTemplate>
</asp:TemplateField>
AnswerRe: gridview binding Pin
Tuwing.Sabado26-May-09 15:37
Tuwing.Sabado26-May-09 15:37 
GeneralRe: gridview binding Pin
jainiraj26-May-09 18:07
jainiraj26-May-09 18:07 
QuestionCompositeControl with dynamic controls Pin
cgreathouse26-May-09 5:40
cgreathouse26-May-09 5:40 
QuestionHow to concate various controls data into a TextBox Pin
Pawan Kiran26-May-09 5:27
Pawan Kiran26-May-09 5:27 
AnswerRe: How to concate various controls data into a TextBox Pin
Manas Bhardwaj26-May-09 10:39
professionalManas Bhardwaj26-May-09 10:39 
GeneralRe: How to concate various controls data into a TextBox Pin
Pawan Kiran27-May-09 0:28
Pawan Kiran27-May-09 0:28 
AnswerRe: How to concate various controls data into a TextBox Pin
Tuwing.Sabado26-May-09 15:47
Tuwing.Sabado26-May-09 15:47 
QuestionWeb Crystal Report from NT Current Event Log Pin
Yakimo26-May-09 4:31
Yakimo26-May-09 4:31 
Questionhow to use the share assembly in the .net Pin
lakshmichawala26-May-09 3:08
lakshmichawala26-May-09 3:08 
AnswerRe: how to use the share assembly in the .net Pin
Manas Bhardwaj26-May-09 3:41
professionalManas Bhardwaj26-May-09 3:41 
QuestionNot a valid virtual path Pin
samerh26-May-09 3:03
samerh26-May-09 3:03 
AnswerRe: Not a valid virtual path Pin
Herman<T>.Instance26-May-09 4:22
Herman<T>.Instance26-May-09 4:22 
GeneralRe: Not a valid virtual path Pin
samerh26-May-09 18:35
samerh26-May-09 18:35 
GeneralRe: Not a valid virtual path Pin
Herman<T>.Instance26-May-09 19:44
Herman<T>.Instance26-May-09 19:44 
GeneralRe: Not a valid virtual path Pin
samerh26-May-09 19:52
samerh26-May-09 19:52 
GeneralRe: Not a valid virtual path Pin
Herman<T>.Instance26-May-09 19:54
Herman<T>.Instance26-May-09 19:54 
GeneralRe: Not a valid virtual path Pin
Herman<T>.Instance26-May-09 20:09
Herman<T>.Instance26-May-09 20:09 

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.