Click here to Skip to main content
15,909,822 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: image did not show up Pin
raju melveetilpurayil18-Aug-10 6:37
professionalraju melveetilpurayil18-Aug-10 6:37 
GeneralRe: image did not show up Pin
Dhyanga19-Aug-10 3:46
Dhyanga19-Aug-10 3:46 
AnswerRe: image did not show up Pin
raju melveetilpurayil19-Aug-10 10:03
professionalraju melveetilpurayil19-Aug-10 10:03 
Questionasp mail server Pin
moein.serpico17-Aug-10 2:06
moein.serpico17-Aug-10 2:06 
AnswerRe: asp mail server Pin
R. Giskard Reventlov17-Aug-10 3:10
R. Giskard Reventlov17-Aug-10 3:10 
AnswerRe: asp mail server Pin
Svetlin Panayotov17-Aug-10 3:35
Svetlin Panayotov17-Aug-10 3:35 
AnswerRe: asp mail server Pin
Not Active17-Aug-10 5:01
mentorNot Active17-Aug-10 5:01 
Questiondynamic Checkbox issue Pin
mobins17-Aug-10 0:20
mobins17-Aug-10 0:20 
i create dynamic checkboxes in coloum of table(<td id="trial" runat="server"></td>) from selecting quantity from dropdwonlist.
well creating dynmic checkbox is not an issue..

well the issue is tht i am not able to check whether the Checkboxes is checked or not on a Button click....

the functiion used for generating dyamic checkbox..


protected void ddlList_SelectedIndexChanged(object sender, EventArgs e)  <br />
    {<br />
int no=convert.toint32(ddlist.selectedvalue);  <br />
 <br />
 <br />
for(int i=1;i=<no;i++)<br />
{<br />
checkbox ch=new checkbox()<br />
ch.ID="chk_t"+i;<br />
ch.text="trl"<br />
 <br />
trial.controls.add(ch);<br />
 <br />
}<br />
}



the function where i check whether checkboxes is checked


protected void btnSave_Click(object sender, EventArgs e)  <br />
    {  <br />
list<string> status_tn=new list<string>();<br />
 <br />
for (int j = 1; j <= no; j++)<br />
            {<br />
               trialid = "chk_t" + j;<br />
 <br />
 <br />
              CheckBox  checks=(CheckBox)trial.FindControl(trialid);<br />
 <br />
 <br />
 <br />
 <br />
                if (checks.Checked)<br />
                {<br />
 <br />
                    status_tn.Add("Trial");<br />
 <br />
 <br />
                }<br />
}<br />
          }


in this function i get error :
:System.NullReferenceException was unhandled by user code

Message="Object reference not set to an instance of an object."

Source="App_Web_pm_-zh7o"

StackTrace:

at btn_save_Click(Object sender, EventArgs e) in d:\Dot Net App\Talents\types_seeb.aspx.cs:line 325

at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
AnswerRe: dynamic Checkbox issue Pin
Satish_S17-Aug-10 0:42
Satish_S17-Aug-10 0:42 
AnswerRe: dynamic Checkbox issue Pin
raju melveetilpurayil17-Aug-10 4:31
professionalraju melveetilpurayil17-Aug-10 4:31 
AnswerRe: dynamic Checkbox issue Pin
Rajendra Prasad Panchati18-Aug-10 21:05
Rajendra Prasad Panchati18-Aug-10 21:05 
Questionbutton in Repeater item Pin
RongNK16-Aug-10 23:42
RongNK16-Aug-10 23:42 
AnswerRe: button in Repeater item Pin
Eaverae17-Aug-10 21:05
Eaverae17-Aug-10 21:05 
GeneralRe: button in Repeater item Pin
RongNK17-Aug-10 21:09
RongNK17-Aug-10 21:09 
GeneralRe: button in Repeater item Pin
Eaverae17-Aug-10 21:31
Eaverae17-Aug-10 21:31 
GeneralRe: button in Repeater item Pin
RongNK17-Aug-10 22:08
RongNK17-Aug-10 22:08 
GeneralRe: button in Repeater item Pin
RongNK17-Aug-10 22:14
RongNK17-Aug-10 22:14 
GeneralRe: button in Repeater item Pin
RongNK17-Aug-10 22:01
RongNK17-Aug-10 22:01 
AnswerRe: button in Repeater item Pin
Eaverae17-Aug-10 22:22
Eaverae17-Aug-10 22:22 
GeneralRe: button in Repeater item Pin
RongNK17-Aug-10 22:34
RongNK17-Aug-10 22:34 
AnswerRe: button in Repeater item Pin
Eaverae17-Aug-10 22:56
Eaverae17-Aug-10 22:56 
GeneralRe: button in Repeater item Pin
RongNK17-Aug-10 22:57
RongNK17-Aug-10 22:57 
AnswerRe: button in Repeater item Pin
cramteke30-Aug-10 3:57
cramteke30-Aug-10 3:57 
QuestionForm insertion Pin
hameedsabacode16-Aug-10 20:35
hameedsabacode16-Aug-10 20:35 
AnswerRe: Form insertion Pin
Morgs Morgan16-Aug-10 21:02
Morgs Morgan16-Aug-10 21:02 

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.