Click here to Skip to main content
16,004,854 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: datasets over class objects to store data Pin
Yusuf24-Apr-09 5:51
Yusuf24-Apr-09 5:51 
QuestionASP.net gzip compression using Response.Filter not working. Pin
Tiju John24-Apr-09 5:23
Tiju John24-Apr-09 5:23 
QuestionDataGrid EditCommand Pin
princy1024-Apr-09 4:40
princy1024-Apr-09 4:40 
AnswerRe: DataGrid EditCommand Pin
Ryomin24-Apr-09 7:48
professionalRyomin24-Apr-09 7:48 
GeneralRe: DataGrid EditCommand Pin
princy1024-Apr-09 21:33
princy1024-Apr-09 21:33 
Questionpassing value Pin
netJP12L24-Apr-09 4:33
netJP12L24-Apr-09 4:33 
AnswerRe: passing value Pin
led mike24-Apr-09 4:44
led mike24-Apr-09 4:44 
QuestionProblem creating server control that extends the CollapsiblePanelExtender from the AJAX toolkit Pin
simonpowers4424-Apr-09 3:54
simonpowers4424-Apr-09 3:54 
I am trying to create a server control library that includes an AJAX component from the AJAX toolkit. I have added the controls to the class and I am either

a) getting an exception thrown when I add the extender to the controls collection. This is the
Extender controls may not be registered after PreRender.
Error.

or b) not getting an exception but the control does not render to the page.

This is the code:

protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
pExtender.Page = this.Page;
ScriptManager.GetCurrent(this.Page).RegisterExtenderControl<collapsiblepanelextender>(pExtender, pnContent);
EnsureChildControls();

}


protected override void RenderContents(HtmlTextWriter output)
{
try
{
//render panel to page
pExtender.Page = this.Page;

//set extender panel options
pExtender.ExpandedText = ExpandedTitle;
pExtender.CollapsedText = CollapsedTitle;
pExtender.ID = "cpe";
pExtender.TargetControlID = "pnContent";
pExtender.ExpandControlID = "pnTitle";
pExtender.CollapseControlID = "pnTitle";
pExtender.Collapsed = InitialCollapsedState;
pExtender.TextLabelID = "lblTitle";
pExtender.ImageControlID = "imgpanel";
pExtender.SuppressPostBack = false;

//set the id for the two content panels
pnContent.ID = "pnContent";
pnTitle.ID = "pnTitle";

//add the label panel to the control
pnTitle.Controls.Add(TheHeader);
//add the form to the panel
pnContent.Controls.Add(theForm);
//render title panel
//this.Controls.Add(pnTitle);
//render content panel
//this.Controls.Add(pnContent);

//pnSurroundingPanel.RenderControl(output);

this.Controls.Add(pExtender);
//pExtender.RenderControl(output);

//this.Controls.Add(pnSurroundingPanel);
//pnSurroundingPanel.RenderControl(output);

pnTitle.RenderControl(output);
pnContent.RenderControl(output);
}
catch (Exception ex)
{
DiagnosticMessage.reportError(ex);
}
}

If I comment out the line that is causing the exception, this.Controls.Add(pExtender); and replace it with pExtender.RenderControl(output); the exception is not shown but the page is blank and the control has not been rendered to the page.

Does anyone know how to get the ajax control to render properly to the page. I have seen several posts regarding this and have tried a few things but nothing has worked yet.

Any help is much appreciated as tis one has been driving me mental!

Notes:

TheHeader is a usercontrol for the header or closed state of the control and the TheForm is the usercontrol that is the content of the open panel.

Thanks
Simon
Questiondoes not contain a definition for 'btnSubmit_Click' Pin
XaraW24-Apr-09 2:52
XaraW24-Apr-09 2:52 
AnswerRe: does not contain a definition for 'btnSubmit_Click' Pin
SeMartens24-Apr-09 3:12
SeMartens24-Apr-09 3:12 
GeneralRe: does not contain a definition for 'btnSubmit_Click' Pin
DoctorMick24-Apr-09 4:26
DoctorMick24-Apr-09 4:26 
QuestionTEMP FOLDER Pin
Member 393125924-Apr-09 2:03
Member 393125924-Apr-09 2:03 
AnswerRe: TEMP FOLDER Pin
DoctorMick24-Apr-09 4:27
DoctorMick24-Apr-09 4:27 
AnswerSelf Cleaning Pin
David Mujica24-Apr-09 5:26
David Mujica24-Apr-09 5:26 
QuestionSession? Pin
Karthick_gc24-Apr-09 1:53
Karthick_gc24-Apr-09 1:53 
AnswerRe: Session? Pin
Abhijit Jana24-Apr-09 2:01
professionalAbhijit Jana24-Apr-09 2:01 
GeneralRe: Session? Pin
Karthick_gc24-Apr-09 2:06
Karthick_gc24-Apr-09 2:06 
GeneralRe: Session? Pin
Sandeep Akhare24-Apr-09 7:52
Sandeep Akhare24-Apr-09 7:52 
GeneralRe: Session? Pin
Abhijit Jana24-Apr-09 18:56
professionalAbhijit Jana24-Apr-09 18:56 
GeneralRe: Session? Pin
Sandeep Akhare27-Apr-09 8:02
Sandeep Akhare27-Apr-09 8:02 
GeneralRe: Session? Pin
Abhijit Jana24-Apr-09 19:06
professionalAbhijit Jana24-Apr-09 19:06 
QuestionNeed to get attibute name Pin
Satish - Developer24-Apr-09 1:33
Satish - Developer24-Apr-09 1:33 
AnswerRe: Need to get attibute name Pin
Paddy Boyd24-Apr-09 1:46
Paddy Boyd24-Apr-09 1:46 
QuestionReport Pin
sulimanpasha24-Apr-09 1:19
sulimanpasha24-Apr-09 1:19 
AnswerRe: Report Pin
scottgp24-Apr-09 1:40
professionalscottgp24-Apr-09 1:40 

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.