Rendering an instance of an asp.net page

F

foobar

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.
 
S

Scott Allen

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.
 
E

Eddie Suey

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?
 
S

Scott Allen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top