How do you go about loading a page into an object in the C# code?
For Example:
Let's say I have a Base Page Object
Then our page extends BasePage and loads data from a database. We can view the page through the browser and it loads fine. We can also access that loaded page and write it to HTML like this:Code:class BasePage : Page { public int ContentID { get { return (int)Request.QueryString["cID"] } } }
When the user requests a page through the browser it loads and gets the data where you can use it like above. HOW CAN THIS BE DONE WITHOUT THE BROWSER REQUEST?Code:BasePage myPage = (BasePage)this.Page; myPage.RenderControl(htmlW);
For example: HOW CAN WE....
How do I start the loading process???Code:BasePage NewsContentPage = new BasePage( ContentID );
Then our page extends BasePage and loads data from a database. We can view the page through the browser and it loads fine. We can also accesss that loaded page and write it to HTML like this:
BasePage myPage = (BasePage)this.Page;
myPage.RenderControl(htmlW);
When the user requests a page through the browser it loads and gets the data where you can use it like above. HOW CAN THIS BE DONE WITHOUT THE BROWSER REQUEST?
For example: HOW CAN WE....
BasePage NewsContentPage = new BasePage( ContentID );
How do I start the loading process???


Reply With Quote


Bookmarks