开发者

Using C# , how can I set a content page property when users clicks on a TabStrip (user control) in master page?

开发者 https://www.devze.com 2022-12-20 04:54 出处:网络
I have a web page (Orders.aspx) that gets some orders and show them in a Gridview . The orders list I get from DB is depend on a field named Status.

I have a web page (Orders.aspx) that gets some orders and show them in a Gridview . The orders list I get from DB is depend on a field named Status. The page has a master page that contains a Tab user control.

The user control has several tabs and every tab has a different Status.

Therefor, when the user c开发者_C百科licks on every tab, I want to pass a value as status to my content page (Orders.aspx) and then select the orders from DB based on status.

How can I do it?

Thank you


In page load of order.cs you can access master page and control of the master page to get its selection. Even public properties of the Master file can be accesssed

Tabstrip tabControl = (Tabstrip) Master.FindControl("Tabstrip1")
//tabControl.Status 

Or

Master.TabstripStatus // Tabstripstatus is a public property of the master page.
0

精彩评论

暂无评论...
验证码 换一张
取 消