Friday, March 16, 2012

Open ASP page in Table (?)


Maybe I am doing this wrong - just started with ASP today, so...

Using VS2005 - creating the backend to the page in VB

I have created the page - added buttons - cool

now I want to open another ASP page BELOW the buttons (I have assumed I create a table where I want it and dump the NEW ASP page in there)

the concept being, as I click the buttons on the main page, the 'sub' pages open up in this TABLE ofr doing whatever I want...

When I go to enter the CODE in VB, I can easily access the button click event - of course - but I do NOT know how to reference the 'sub' page or define the table to open the other page IN the table...

I THINK the issue is I don't know how to reference the TABLE or the PAGE in VB - or to define references for them (in the VB editor)

Cheers

Welcome to the world of ASP! Glad to see your are throwing yourself right into the fire and playing with the bits.

Unless you work with 'Master Pages', ASP pages do not get nested as you are trying to do. I would suggest you look into UserControls or Panels (or even DIV tags) if you are interested in hiding/showing certain areas on a page.

In the codebehind page you can reference the page by using the Me keyword.

You can access any server controls on the page, including tables, by referencing the name you assigned to the Id attribute of the control.

I recommend you have a look at theQuickStart tutorials. There a good way to get your feet wet and understand a few basic fundamentals.

Again - welcome! Look forward to helping you progress.

James Steele


This should keep me busy for a bit - hehe

Cheers


The link was very helpful - apart from a couple of things that took a bit to figure out

(PostBackUrl being the key on the asp:button)

creating a master page was fairly straight forward - got it working -

Now I just need to setup the individual content on the vwrious pages...

Thanks...

Scott


Great. You will find lots of other usefull information around here. Have fun!

0 comments:

Post a Comment