|
-
Jun 18th, 2006, 12:30 AM
#1
Thread Starter
Lively Member
[RESOLVED] reponse.write a web control
Hi everyone,
I'm actually trying to do something crazy....
I have a webpage that reponse.writes tables, data, etc.
In that page, I have 1 webcontrol that needs to be response written to a specific area during the whole response write process.
Is this possible? Should I provide more info? Any help is greatly appreciated with rating points.
-
Jun 18th, 2006, 08:58 AM
#2
Re: reponse.write a web control
 Originally Posted by SpagettiProg
I have a webpage that reponse.writes tables, data, etc.
Why?
In that page, I have 1 webcontrol that needs to be response written to a specific area during the whole response write process.
Web controls use output.write to write when being rendered. What do you mean by 'specific area'? Do you mean inside the control itself or to some other area of the page?
-
Jun 19th, 2006, 10:15 AM
#3
Thread Starter
Lively Member
Re: reponse.write a web control
 Originally Posted by mendhak
Why?
Because, I'm converting an existing cold fusion page to asp.net.
I want to keep the original format as the old page. The format varies on the data that is pulled from the database.
 Originally Posted by mendhak
Web controls use output.write to write when being rendered. What do you mean by 'specific area'? Do you mean inside the control itself or to some other area of the page?
An area in the page.
-
Jun 19th, 2006, 01:53 PM
#4
Re: reponse.write a web control
Unless you HAVE to (can't think of a reason though) I'd rethink the way you are doing this and not response.write everything to the page.
To place controls in specifc area's of the page you can have a placeholder on the page and then in code add your user control to the placeholder.
-
Jun 19th, 2006, 03:10 PM
#5
Re: reponse.write a web control
 Originally Posted by SpagettiProg
Because, I'm converting an existing cold fusion page to asp.net.
I want to keep the original format as the old page. The format varies on the data that is pulled from the database.
An area in the page.
Might as well leave it as it is right now then
If you want to write to another area of the page, create a function in your web user control that will accept a string. This string will be the ID of a div in another area of your page. You can then use Page.RegisterStartupScript() to call a javascript function which will write to the div's .innerHTML or .innerText property.
-
Jun 19th, 2006, 05:12 PM
#6
Thread Starter
Lively Member
Re: reponse.write a web control
Thanks everyone. I will try Mendhak's suggestions.
I will also try avoiding the response.write and maybe formating the table through program control in the code behind. (that way, I avoid having to place a control in a specific area of the page)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|