I’m having trouble figuring out something that should be simple but I’m having trouble trying to figure it out.
I have a Page (Default.aspx) which contaiins a WebTab Control (Infragistics, but shouldn’t matter really). Inside each Tab Control of the WebTab is another page, Page1.aspx, Page2.apx, so it’s like this:
Default.aspx
WebTab
WebTabControl(0)
Page1.aspx <-- I'm in this codebehind after
calling __doPostBack from JavaScript
as I have a parameter from a WebDataGrid.
WebTabControl(1)
Page2.aspx <-- I want to open this page and pass it a parameter.
I’m in Page1.aspx codebehind doing a postback as I have a parameter that I need to pass to the next page, and I want to open Page2.apx which is inside the 2nd Tab.
Basically, I think I need to do the following steps.
1. Set the Active Tab to WebTabControl(1)
2. Give it the Parameter that I have for it to do something with.
I know I’ll have to shoot myself once someone tells how to do it 🙂
Thanks!
Thanks very much for the response, but that’s not what I was looking for.
What I actually did to resolve this problem was to create a JavaScript function in the Default.aspx page that I was able to call from Page1.aspx.
This is the function in the Default.aspx Page, which activated the Tab that I needed and populated the search box with the value I needed from the WebDataGrid from Page1.aspx.
I was then able to call the activateTab() function from Page1.aspx with the following function, which is called from the DoubleClick event of the WebDataGrid (I needed to grab a value from the row that was selected.)
The next step was to call this JavaScript function on Page2.aspx from the activateTab() function on Default.aspx as shown in the first code example.
This actually did the post back that I needed so that’s all I had to do. If I wanted to pass those 2 __doPostBack() values into the Page2.aspx Page_Load event, I would have to do the following. However in my case the Post back was all I needed as I had already populated the search box.
For those who don’t understand the last part with the __EVENT* code, it’s possible if you use a ScriptManager, otherwise you have to code your own Parameters, which I won’t get into here.
That’s all there was to it. I certainly learned some JavaScript along the way here so I hope it’s useful for someone else out there.
Thanks
Dave