Click here to Skip to main content
15,895,142 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: include files and event handling Pin
gagirl_4323-Mar-06 13:55
gagirl_4323-Mar-06 13:55 
GeneralRe: include files and event handling Pin
Jesse Evans24-Mar-06 6:03
Jesse Evans24-Mar-06 6:03 
Questionhow to send and receive sms from internet Pin
govindnaroji25-Mar-05 7:23
govindnaroji25-Mar-05 7:23 
Questionasp:button image? Pin
bizjosh25-Mar-05 0:19
bizjosh25-Mar-05 0:19 
General[ASP.net / C#] Checkbox Checked Always false Pin
Jaymz66624-Mar-05 23:57
Jaymz66624-Mar-05 23:57 
GeneralRe: [ASP.net / C#] Checkbox Checked Always false Pin
Jeff Martin28-Mar-05 7:38
Jeff Martin28-Mar-05 7:38 
GeneralRe: [ASP.net / C#] Checkbox Checked Always false Pin
Jaymz66628-Mar-05 21:41
Jaymz66628-Mar-05 21:41 
GeneralRe: [ASP.net / C#] Checkbox Checked Always false Pin
Jeff Martin29-Mar-05 3:13
Jeff Martin29-Mar-05 3:13 
It is definitely a post back issue. When you fill the table, you are creating all new checkboxes. Instead of having one function that checks all of them, could you change to use the CheckChanged event handler?

<br />
void CheckBox_CheckedChanged(object sender, EventArgs e)<br />
    {<br />
        CheckBox c = (CheckBox)sender;<br />
        if (c.Checked)<br />
        {<br />
            Response.Write(c.ID);<br />
            Response.Write("Works!");<br />
        }<br />
    }<br />


and add this to your checkbox setup...

<br />
CheckBox chkBox = new CheckBox();<br />
chkBox.ID = "chk" + i.ToString();<br />
chkBox.Text = "#" + i.ToString();<br />
chkBox.AutoPostBack = true;<br />
chkBox.EnableViewState = true; // I thought this might work<br />
chkBox.CheckedChanged += CheckBox_CheckedChanged;<br />


Jeff Martin
My Blog
GeneralJavascript for adding html Pin
shaiba24-Mar-05 19:12
shaiba24-Mar-05 19:12 
GeneralRe: Javascript for adding html Pin
Yulianto.27-Mar-05 15:37
Yulianto.27-Mar-05 15:37 
GeneralRe: Javascript for adding html Pin
Anonymous27-Mar-05 17:33
Anonymous27-Mar-05 17:33 
GeneralRe: Javascript for adding html Pin
Yulianto.27-Mar-05 17:47
Yulianto.27-Mar-05 17:47 
GeneralASP.NET VB on DWMX for User Registration page Pin
bizjosh24-Mar-05 17:36
bizjosh24-Mar-05 17:36 
GeneralCSocket &amp; critical sections under IIS 6 Pin
Sorin24-Mar-05 15:48
Sorin24-Mar-05 15:48 
GeneralASP cant read the data from the Access database Pin
Member 145397924-Mar-05 15:39
Member 145397924-Mar-05 15:39 
GeneralRe: ASP cant read the data from the Access database Pin
Hesham Amin26-Mar-05 0:53
Hesham Amin26-Mar-05 0:53 
GeneralProblems Transfering div contents x-browser Pin
loane24-Mar-05 12:40
loane24-Mar-05 12:40 
GeneralQuestion regarding using the same input! Pin
Jamal42024-Mar-05 10:42
Jamal42024-Mar-05 10:42 
Generalcombo control appear infront of menu Pin
TariqMahmood24-Mar-05 0:41
TariqMahmood24-Mar-05 0:41 
GeneralCWebBrowser ActiveX Pin
Grahamfff23-Mar-05 10:46
Grahamfff23-Mar-05 10:46 
GeneralDestroying objects Pin
paixtis23-Mar-05 9:00
paixtis23-Mar-05 9:00 
GeneralA string problem.. Pin
Monisankar22-Mar-05 22:53
Monisankar22-Mar-05 22:53 
GeneralRe: A string problem.. Pin
Jeff Martin23-Mar-05 8:20
Jeff Martin23-Mar-05 8:20 
GeneralRe: A string problem.. Pin
kutz923-Mar-05 10:54
kutz923-Mar-05 10:54 
GeneralRe: A string problem.. Pin
Monisankar23-Mar-05 20:04
Monisankar23-Mar-05 20:04 

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.