Click here to Skip to main content
15,921,463 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ASP.Net Message Box Pin
J Liang19-Apr-07 16:33
J Liang19-Apr-07 16:33 
GeneralRe: ASP.Net Message Box Pin
J Liang22-Apr-07 17:33
J Liang22-Apr-07 17:33 
AnswerRe: ASP.Net Message Box Pin
ritu432118-Apr-07 19:29
ritu432118-Apr-07 19:29 
GeneralRe: ASP.Net Message Box Pin
J Liang19-Apr-07 16:20
J Liang19-Apr-07 16:20 
QuestionCan we use ASP files in ASP.Net Solution Pin
Rahithi18-Apr-07 17:25
Rahithi18-Apr-07 17:25 
AnswerRe: Can we use ASP files in ASP.Net Solution Pin
Elizma18-Apr-07 18:05
Elizma18-Apr-07 18:05 
QuestionAccessing a List<object[]> from a repeater control Pin
eggie518-Apr-07 12:07
eggie518-Apr-07 12:07 
QuestionHow to get Server control to access parent container's controls collection? Pin
Dominic Pettifer18-Apr-07 12:04
Dominic Pettifer18-Apr-07 12:04 
Hello. Is there any way a custom server control can can programmatically add controls to the parent pages controls collection?

I've tried the following...

protected override void Render(HtmlTextWriter writer)<br />
{<br />
   this.Page.Controls.Add(new HtmlGenericControl("div"));<br />
   ....<br />
}


...but it gives me an error "Collection was modified; enumeration operation may not execute.". I've also tried adding the above code into the OnPreRender and OnInit events but it still gives me an error, this time "The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.".

What I am trying to do is get a server control to add a div tag to the parent page but positioned just after the opening body tag or just before the closing body tag, just so that it's not wrapped in any other elements basically. Something tells me this isn't possible but thought I'd ask you folks before I gave up on this.

Dominic Pettifer

Blog: www.dominicpettifer.co.uk

AnswerRe: How to get Server control to access parent container's controls collection? Pin
koleraba18-Apr-07 15:41
koleraba18-Apr-07 15:41 
QuestionGrid view delete Pin
hahii18-Apr-07 11:04
hahii18-Apr-07 11:04 
QuestionASP.NET and K2.NET 2003 Problem [modified] Pin
Elizma18-Apr-07 8:49
Elizma18-Apr-07 8:49 
QuestionWeb server control(textbox) events Pin
hbk_leo18-Apr-07 8:00
hbk_leo18-Apr-07 8:00 
AnswerRe: Web server control(textbox) events Pin
kubben18-Apr-07 8:19
kubben18-Apr-07 8:19 
AnswerRe: Web server control(textbox) events Pin
_mubashir18-Apr-07 8:19
_mubashir18-Apr-07 8:19 
AnswerRe: Web server control(textbox) events Pin
Not Active18-Apr-07 8:22
mentorNot Active18-Apr-07 8:22 
QuestionASP.NET Deploying Pin
hariram2818-Apr-07 7:29
hariram2818-Apr-07 7:29 
AnswerRe: ASP.NET Deploying Pin
kubben18-Apr-07 8:18
kubben18-Apr-07 8:18 
GeneralRe: ASP.NET Deploying Pin
hariram2819-Apr-07 0:29
hariram2819-Apr-07 0:29 
GeneralRe: ASP.NET Deploying Pin
kubben19-Apr-07 1:44
kubben19-Apr-07 1:44 
GeneralRe: ASP.NET Deploying Pin
hariram2819-Apr-07 7:34
hariram2819-Apr-07 7:34 
GeneralRe: ASP.NET Deploying Pin
kubben19-Apr-07 7:46
kubben19-Apr-07 7:46 
GeneralRe: ASP.NET Deploying Pin
hariram2819-Apr-07 22:25
hariram2819-Apr-07 22:25 
GeneralRe: ASP.NET Deploying Pin
kubben20-Apr-07 2:02
kubben20-Apr-07 2:02 
QuestionHow can I display or hide columns for Gridview in ASP.NET 2.0? Pin
radshaykho18-Apr-07 5:58
radshaykho18-Apr-07 5:58 
AnswerRe: How can I display or hide columns for Gridview in ASP.NET 2.0? Pin
enjoycrack18-Apr-07 7:07
enjoycrack18-Apr-07 7:07 

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.