Click here to Skip to main content
15,891,864 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Server enforced information pop up window Pin
Piyush Vardhan Singh25-Jul-07 21:42
Piyush Vardhan Singh25-Jul-07 21:42 
AnswerRe: Server enforced information pop up window Pin
Christian Graus25-Jul-07 21:49
protectorChristian Graus25-Jul-07 21:49 
Questionasp.net 2.0 Pin
ritu432125-Jul-07 20:19
ritu432125-Jul-07 20:19 
AnswerRe: asp.net 2.0 Pin
Chetan Patel25-Jul-07 20:27
Chetan Patel25-Jul-07 20:27 
AnswerRe: asp.net 2.0 Pin
Christian Graus25-Jul-07 21:19
protectorChristian Graus25-Jul-07 21:19 
GeneralRe: asp.net 2.0 Pin
Edwin Syarief25-Jul-07 22:15
Edwin Syarief25-Jul-07 22:15 
GeneralRe: asp.net 2.0 Pin
Christian Graus25-Jul-07 23:10
protectorChristian Graus25-Jul-07 23:10 
Questionproblem with accessing control created dynamically Pin
imranafsari25-Jul-07 20:11
imranafsari25-Jul-07 20:11 
Dear All,

I am using asp.net2.0, C#, sql2005 using Visual studio 2005

Let Me explain the scenario I have checkboxlist containg 15 field. Based on no of checked field . I created dropdownlistbox and label dynamically through loop and assign id as dropdownlist + no of iteration. Now my question is how I access these control as when I am accessing one of the control I am getting nullobjectreference error stating “Object reference not set to an instance of an object.”I created control as

Foreach(listitem)
{

//…….
Label label = new Label();
DropDownList dropdownlist = new DropDownList();
//assinging id
label.ID = "label" + i.ToString() ;
dropdownlist.ID = "dropdownlist" + i.ToString() ;

}
And I am accessing it through

cmd.Parameters.Add("@para1", SqlDbType.VarChar).Value = Page.FindControl("label1").ToString() ;
cmd.Parameters.Add("@value1", SqlDbType.VarChar).Value = Page.FindControl("dropdownlist1").ToString();

and my second question is how do i access selected value in dropdownlist1(dynamically created control)

Please guide me

Thanks






imaran khan

GeneralRe: problem with accessing control created dynamically Pin
N a v a n e e t h25-Jul-07 21:18
N a v a n e e t h25-Jul-07 21:18 
AnswerRe: problem with accessing control created dynamically Pin
Christian Graus25-Jul-07 21:20
protectorChristian Graus25-Jul-07 21:20 
Questionhow to run (asp.net with C#) website using IIS Pin
srajasekhar25-Jul-07 20:10
srajasekhar25-Jul-07 20:10 
AnswerRe: how to run (asp.net with C#) website using IIS Pin
Chetan Patel25-Jul-07 20:17
Chetan Patel25-Jul-07 20:17 
Questionerror in response.form("") Pin
Sonia Gupta25-Jul-07 19:58
Sonia Gupta25-Jul-07 19:58 
AnswerRe: error in response.form("") Pin
_mubashir25-Jul-07 20:09
_mubashir25-Jul-07 20:09 
GeneralRe: error in response.form("") Pin
Sonia Gupta25-Jul-07 20:21
Sonia Gupta25-Jul-07 20:21 
GeneralRe: error in response.form("") Pin
_mubashir25-Jul-07 22:11
_mubashir25-Jul-07 22:11 
AnswerRe: error in response.form("") Pin
Chetan Patel25-Jul-07 20:11
Chetan Patel25-Jul-07 20:11 
GeneralRe: error in response.form("") Pin
Sonia Gupta25-Jul-07 20:21
Sonia Gupta25-Jul-07 20:21 
AnswerRe: error in response.form("") Pin
Imran Khan Pathan25-Jul-07 20:12
Imran Khan Pathan25-Jul-07 20:12 
GeneralRe: error in response.form("") Pin
Sonia Gupta25-Jul-07 20:19
Sonia Gupta25-Jul-07 20:19 
GeneralRe: error in response.form("") Pin
Piyush Vardhan Singh25-Jul-07 20:43
Piyush Vardhan Singh25-Jul-07 20:43 
AnswerRe: error in response.form("") Pin
Sandeep Kumar25-Jul-07 21:04
Sandeep Kumar25-Jul-07 21:04 
Questionserver.transfer [modified] Pin
Sonia Gupta25-Jul-07 19:37
Sonia Gupta25-Jul-07 19:37 
AnswerRe: server.transfer Pin
Sandeep Kumar25-Jul-07 20:26
Sandeep Kumar25-Jul-07 20:26 
AnswerRe: server.transfer Pin
Chetan Patel25-Jul-07 20:31
Chetan Patel25-Jul-07 20:31 

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.