Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Hi all

 

I have a page .aspx with this structure:

 

<mycontrol_for_head>

<mycontrol_for_title>

<body>

<mycontrol_for_foot>

 

And here is all ok.

 

Now, I need to insert some "code" into body making it "dynamic".

This was simple in ASP: it let you mix body html and asp code.

 

With asp.net there is something that don't work.

I think "well, I do another usercontrol to place into the page body", but this seems to be compiled and placed on the top of the page.

 

I think this is due to the Response.Write("MyOutput") method I use to "create" my control.

 

There is a way to put some code into a usercontrol and make it appear where i put it?

 

Thanx

Edited by neodatatype

> NeoDataType.net <

Try my Free .Net Reporting Tool!

Posted

You shouldn't be using Response.Write(), use RenderControls instead.

 

I thank you, was that!

 

I solved just putting in my control

 

protected override void Render(HtmlTextWriter output){
   output.Write(my_rendered_control);
}

> NeoDataType.net <

Try my Free .Net Reporting Tool!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...