Click here to Skip to main content
15,917,793 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Paging in Data List Pin
Sun Rays5-Feb-08 19:00
Sun Rays5-Feb-08 19:00 
GeneralRe: Paging in Data List Pin
dilipv5-Feb-08 22:38
dilipv5-Feb-08 22:38 
Generaldon't want to display the query string in address bar Pin
anujose5-Feb-08 17:38
anujose5-Feb-08 17:38 
GeneralRe: don't want to display the query string in address bar Pin
That's Aragon5-Feb-08 18:04
That's Aragon5-Feb-08 18:04 
GeneralRe: don't want to display the query string in address bar Pin
N a v a n e e t h5-Feb-08 19:16
N a v a n e e t h5-Feb-08 19:16 
Generalgridview Pin
trilokharry5-Feb-08 17:23
trilokharry5-Feb-08 17:23 
Generalgridview Pin
trilokharry5-Feb-08 17:29
trilokharry5-Feb-08 17:29 
QuestionHow to get the Text and ID of CheckBox Pin
sjs4u5-Feb-08 17:19
sjs4u5-Feb-08 17:19 
Hi,


I am using repeater control. In that I am repeate the checkbox control.
If the check box is check then I want the ID and Text of that check box
and stored it into the database.


How can I do this?

For ur information the code is like below:-

.cs code

protected void Repeater1_ItemCreated(object sender, RepeaterItemEventArgs e)
{
RepeaterItem ri = (RepeaterItem)e.Item;

if (ri.ItemType == ListItemType.Item || ri.ItemType == ListItemType.AlternatingItem)
{
CheckBox cb = ri.FindControl("cb") as CheckBox;
cb.CheckedChanged += new EventHandler(cb_CheckedChanged);
Label lblID = ri.FindControl("bt") as Label;
string str = lblID.AssociatedControlID.ToString();
string str1 = lblID.Text.ToString();

}
}
private void cb_CheckedChanged(object sender, EventArgs e)
{
CheckBox cb = (CheckBox)sender;

if (cb.Checked)
{

string str = cb.Text;

}
else
{
//this.Response.Write("Unchecked");
}
}

----------------------------------------------------------------

and .aspx code :-
<asp:repeater id="Repeater1" runat="server" onitemcommand="Repeater1_ItemCommand" onitemcreated="Repeater1_ItemCreated"><itemtemplate>
<asp:checkbox autopostback="true" id="cb" runat="server">

<asp:label id="lblID" runat="server" visible="false" enabled="false">]]>>
<asp:label id="bt" runat="server">]]>






Thank you

sjs4u
Questioncrystall report printer status Pin
kvijayajyothy5-Feb-08 17:07
kvijayajyothy5-Feb-08 17:07 
Questioncan anyone recommend a good shoppingcart? Pin
icewolf_snowfire5-Feb-08 8:55
icewolf_snowfire5-Feb-08 8:55 
GeneralRe: can anyone recommend a good shoppingcart? Pin
Vasudevan Deepak Kumar6-Feb-08 1:37
Vasudevan Deepak Kumar6-Feb-08 1:37 
GeneralRe: can anyone recommend a good shoppingcart? Pin
Brendan Vogt6-Feb-08 1:46
Brendan Vogt6-Feb-08 1:46 
QuestionException Handling Ajax enabled function Pin
SNarayanan5-Feb-08 7:18
SNarayanan5-Feb-08 7:18 
GeneralAjax Issue Pin
Ajeet mittal5-Feb-08 6:21
Ajeet mittal5-Feb-08 6:21 
GeneralRe: Ajax Issue Pin
N a v a n e e t h5-Feb-08 7:01
N a v a n e e t h5-Feb-08 7:01 
GeneralRe: Ajax Issue Pin
Ajeet mittal5-Feb-08 9:04
Ajeet mittal5-Feb-08 9:04 
GeneralRe: Ajax Issue Pin
Mark Churchill5-Feb-08 14:40
Mark Churchill5-Feb-08 14:40 
GeneralRe: Ajax Issue Pin
Vasudevan Deepak Kumar5-Feb-08 21:02
Vasudevan Deepak Kumar5-Feb-08 21:02 
QuestionAjax Issue Pin
Ajeet mittal5-Feb-08 21:09
Ajeet mittal5-Feb-08 21:09 
GeneralRe: Ajax Issue Pin
Malcolm Smart5-Feb-08 21:52
Malcolm Smart5-Feb-08 21:52 
GeneralRe: Ajax Issue Pin
Vasudevan Deepak Kumar6-Feb-08 1:40
Vasudevan Deepak Kumar6-Feb-08 1:40 
JokeRe: Ajax Issue Pin
Ri Qen-Sin6-Feb-08 3:18
Ri Qen-Sin6-Feb-08 3:18 
GeneralRe: Ajax Issue Pin
Ri Qen-Sin6-Feb-08 3:19
Ri Qen-Sin6-Feb-08 3:19 
QuestionIIS/ASP.NET High Load Pin
Vasudevan Deepak Kumar5-Feb-08 5:41
Vasudevan Deepak Kumar5-Feb-08 5:41 
GeneralRe: IIS/ASP.NET High Load Pin
Sam Xavier13-Feb-08 23:34
Sam Xavier13-Feb-08 23: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.