473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Rendering an instance of an asp.net page

I have created a .net .aspx web page and would like to render the object
after setting some properties. I would also like to have event handlers in
the parent window that could respond to events raised by this page object.
For instance,
''''Sudo code
Dim MyPageInstance as new MyPage() ' Create and instance of the object
MyPageInstance.Color = "red" ' Set various properties
MyPageInstance.Render(path) ' Rener page to new browser
window
'More Code

Protected Sub MyPageInstance_OnChange(sender as object, e as eventargs)
handles MyPage.OnChange
'Code 'onchange
rebind data in parent window
End Sub

I appreciate any responses.
Nov 19 '05 #1
3 1202
ASP.NET can only respond to the browser window that made the request. It's
different than windows form based programming because the server and the
client are effectively isolated and disconnected. The client makes a request,
the server sends a response. Those are the only two events.

--
Scott
http://www.OdeToCode.com/blogs/scott/
I have created a .net .aspx web page and would like to render the
object
after setting some properties. I would also like to have event
handlers in
the parent window that could respond to events raised by this page
object.
For instance,
''''Sudo code
Dim MyPageInstance as new MyPage() ' Create and instance of the
object
MyPageInstance.Color = "red" ' Set various properties
MyPageInstance.Render(path) ' Rener page to new
browser
window
'More Code
Protected Sub MyPageInstance_OnChange(sender as object, e as
eventargs)
handles MyPage.OnChange
'Code 'onchange
rebind data in parent window
End Sub
I appreciate any responses.

Nov 19 '05 #2


Thanks for your reply Scott.
Is there a way to create an instance of an aspx class object and (after
setting some properties) render the instance to a browser?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #3
That's essentially the ASP.NET paradigm. The browser makes a request
and ASP.NET will create an instance of your web form. In simple forms
you can set all the properties you need during Page_Load and then the
page object renders to the client.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 21 Jan 2005 05:28:09 -0800, Eddie Suey
<es***@inbizservices.com> wrote:


Thanks for your reply Scott.
Is there a way to create an instance of an aspx class object and (after
setting some properties) render the instance to a browser?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 19 '05 #4

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

Similar topics

3
by: foobar | last post by:
Okay, if I create an instance of an .aspx page and set the properties of that page, how do I render that instance? Server.Transfer creates a new instance of its own and none of the properties have...
3
by: kurt sune | last post by:
I have quite an annoying error. I have created a web custom control. When I put it on a web page I do not get: "The control's default rendering, which is simply the name of the control...
5
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever....
1
by: Jarod | last post by:
Hey When I put my control into DetailsView in a template I see it and it seems as working ok. After compile it works on the page. But in normal view in designer I don't see my detailsView instead...
0
by: postings | last post by:
Hi The code below compiles and works. It's a control derived from a drop down list that displays countries for the user to select. My issue is that is I look in the drop down list in Design view...
2
by: Spotnick | last post by:
I have no idea why, but since I'm trying to recreate my website using ASP.NET 2.0 I've encountered so many performance issues that I'm about to give up and continue using v1.1 Seriously, how can...
0
by: Jeff Morgan | last post by:
I have an application that runs on ASP.NET. We have been working through performance testing and it appears that at about 40-50 users, I start to get CPU bound. The application is a three form,...
6
by: Justin.Voelker | last post by:
Can anyone clue me on on how to have my html page continue rendering past a MySQL error? If you visit www.Base2WebDesign.com, click login, type in anything for a username and password, then view...
3
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.