473,461 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

User control's Response

mtv
Hi all,

I have a page default.aspx and lots of user controls (Top.ascx,
LeftNav.ascx, Page1Content.ascx, Page2Content.ascx...). The default.aspx
contains Top.ascx, LeftNav.ascx at design time, and dynamically loads
PageNContent.ascx based on user's selection. That is if user select
Page1->Page1Content.ascx is loaded at run-time....

In Page1Content.ascx, if I have Response.write("...."), this will write the
output on top of the output html page. How can I write data to within the
Content area? What I ultimately want to achieve is, for all pages, Top &
LeftNav are always the same, the content of each page is data-driven from DB
and presented using CSS within the "Content" area.

Thanks.

--
Your 2 cents are worth $milion$. Thanks.
Nov 19 '05 #1
4 1420
Don't use Response.Write. This is the old ASP way which doesn't work in
ASP.Net as ASP.Net is event driven. You need to use the appropriate control
to place your text into. You can add a Label control and then place the
output into the Label's Text property.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"mtv" <mt*@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
Hi all,

I have a page default.aspx and lots of user controls (Top.ascx,
LeftNav.ascx, Page1Content.ascx, Page2Content.ascx...). The default.aspx
contains Top.ascx, LeftNav.ascx at design time, and dynamically loads
PageNContent.ascx based on user's selection. That is if user select
Page1->Page1Content.ascx is loaded at run-time....

In Page1Content.ascx, if I have Response.write("...."), this will write
the
output on top of the output html page. How can I write data to within the
Content area? What I ultimately want to achieve is, for all pages, Top &
LeftNav are always the same, the content of each page is data-driven from
DB
and presented using CSS within the "Content" area.

Thanks.

--
Your 2 cents are worth $milion$. Thanks.

Nov 19 '05 #2
mtv
Mark,

I do have labels as you said and that solution works well. However, the
reason I want to use Response.Write() [for some other text output] is to
apply Presentation rules using CSS or xslt on them, unless there's a better
design solution that allows users change the presentation using configuration
tool.

Thanks.
"Mark Fitzpatrick" wrote:
Don't use Response.Write. This is the old ASP way which doesn't work in
ASP.Net as ASP.Net is event driven. You need to use the appropriate control
to place your text into. You can add a Label control and then place the
output into the Label's Text property.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"mtv" <mt*@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
Hi all,

I have a page default.aspx and lots of user controls (Top.ascx,
LeftNav.ascx, Page1Content.ascx, Page2Content.ascx...). The default.aspx
contains Top.ascx, LeftNav.ascx at design time, and dynamically loads
PageNContent.ascx based on user's selection. That is if user select
Page1->Page1Content.ascx is loaded at run-time....

In Page1Content.ascx, if I have Response.write("...."), this will write
the
output on top of the output html page. How can I write data to within the
Content area? What I ultimately want to achieve is, for all pages, Top &
LeftNav are always the same, the content of each page is data-driven from
DB
and presented using CSS within the "Content" area.

Thanks.

--
Your 2 cents are worth $milion$. Thanks.


Nov 19 '05 #3
Hi,

You can do that with label also. If you explain in detail, I may help u.

Prakash.C

"mtv" wrote:
Mark,

I do have labels as you said and that solution works well. However, the
reason I want to use Response.Write() [for some other text output] is to
apply Presentation rules using CSS or xslt on them, unless there's a better
design solution that allows users change the presentation using configuration
tool.

Thanks.
"Mark Fitzpatrick" wrote:
Don't use Response.Write. This is the old ASP way which doesn't work in
ASP.Net as ASP.Net is event driven. You need to use the appropriate control
to place your text into. You can add a Label control and then place the
output into the Label's Text property.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"mtv" <mt*@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
Hi all,

I have a page default.aspx and lots of user controls (Top.ascx,
LeftNav.ascx, Page1Content.ascx, Page2Content.ascx...). The default.aspx
contains Top.ascx, LeftNav.ascx at design time, and dynamically loads
PageNContent.ascx based on user's selection. That is if user select
Page1->Page1Content.ascx is loaded at run-time....

In Page1Content.ascx, if I have Response.write("...."), this will write
the
output on top of the output html page. How can I write data to within the
Content area? What I ultimately want to achieve is, for all pages, Top &
LeftNav are always the same, the content of each page is data-driven from
DB
and presented using CSS within the "Content" area.

Thanks.

--
Your 2 cents are worth $milion$. Thanks.


Nov 19 '05 #4
mtv
Prakash:

What I want to do is: on each page, I'll have a Top banner, Left nav, Bottom
banner and Content section in between. So, I built each "area" as a control
(Top.ascx...).

The content gets data from database and has its own CSS for presentation (if
not, use default CSS). Data has 2 types of data: business data (BD) and
webpage content data (WCD). BD is like account info, user name/addr, Job
openings, etc.. WCD is like Our Service info, Career Intro, Page intro....
Users have a Content Management Tool that can edit page CSS and WCD. WCD may
even have html tags in it like links, email...

When loading a page, both BD and WCD avail to the page are loaded and
presented based on CSS. At this time, I don't think it's reasonable to have
only CSS dictate the look of the returned page; only some areas in the
Content are. I have not found the balance between designed presentation and
configured presentation (CSS changed by users). What's the best way to do to
accomplish this? How would you design this requirement?

Thanks.
"Prakash.NET" wrote:
Hi,

You can do that with label also. If you explain in detail, I may help u.

Prakash.C

"mtv" wrote:
Mark,

I do have labels as you said and that solution works well. However, the
reason I want to use Response.Write() [for some other text output] is to
apply Presentation rules using CSS or xslt on them, unless there's a better
design solution that allows users change the presentation using configuration
tool.

Thanks.
"Mark Fitzpatrick" wrote:
Don't use Response.Write. This is the old ASP way which doesn't work in
ASP.Net as ASP.Net is event driven. You need to use the appropriate control
to place your text into. You can add a Label control and then place the
output into the Label's Text property.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"mtv" <mt*@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
> Hi all,
>
> I have a page default.aspx and lots of user controls (Top.ascx,
> LeftNav.ascx, Page1Content.ascx, Page2Content.ascx...). The default.aspx
> contains Top.ascx, LeftNav.ascx at design time, and dynamically loads
> PageNContent.ascx based on user's selection. That is if user select
> Page1->Page1Content.ascx is loaded at run-time....
>
> In Page1Content.ascx, if I have Response.write("...."), this will write
> the
> output on top of the output html page. How can I write data to within the
> Content area? What I ultimately want to achieve is, for all pages, Top &
> LeftNav are always the same, the content of each page is data-driven from
> DB
> and presented using CSS within the "Content" area.
>
> Thanks.
>
> --
> Your 2 cents are worth $milion$. Thanks.

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Zi | last post by:
I have a user control within a data grid. I am binding the user control to one of the values from the data grid. The data grid implements paging. It is all working ok for the first page but once i...
4
by: Moe Sizlak | last post by:
Hi There, I am trying to return the value of a listbox control that is included as a user control, I can return the name of the control but I can't access the integer value of the selected item,...
10
by: George G. | last post by:
Hi there, I am busy writing a new asp.net application and I am reusing some of my existing asp functions and methods in a user control. I need access to session, request and response in some of...
4
by: Marty U. | last post by:
I have a Session variable I need to check the value of. If it is value a then redirect to some page. I need to implement this in a user control that is on all the relevent pages. I placed the if...
2
by: Nathan Sokalski | last post by:
I am using the Response.Redirect method in a User Control to allow visitors to click an ImageButton to take them to another page. However, when I click the ImageButton I recieve the following...
5
by: Trisha | last post by:
I have a navigation user control navig.ascx that redirects to respective pages based on webcontrols.linkbutton clicks using response.redirect. I would like to control the look and feel of those...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
5
by: c676228 | last post by:
Hi, I guess I am confused. In aspx script, I mean (you won't use Codebehind="enrollinfo.aspx.vb", but mix code with html and code together) You can access user control's property directly. Since I...
9
by: abprules | last post by:
Can somehow tell me the best way for multi user development to occur in MS Access? The situation is: We are creating a new database for a small company. There are 2 of us who want to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.