473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Can web forms communicate with one another directly?

Can one webform reference another webform in the same project? I would like
WebformB to tell WebformA to change the selected tab on a tabcontrol sited
on WebformA.

If not possible, please, just reply it's not possible.
Example: Call WebformA.TabShow("pagBoard"), the
reference to WebformA is not resolved. Thanks, Dean S
Partial Public Class WebformA

Inherits System.Web.UI.Page

'function in WebformA:

Public Sub TabShow(ByVal strTabName As String)

Select Case strTabName

Case "pagSearch"

tab.SelectedTab =
tab.Tabs.IndexOf(tab.Tabs.FromKey("pagSearch"))

Case "pagBoard"

tab.SelectedTab =
tab.Tabs.IndexOf(tab.Tabs.FromKey("pagBoard"))

Case Else

'error message

End Select

End Sub

End Class

Partial Class WebformB

Inherits System.Web.UI.Page

Call WebformA.TabShow("pagBoard")

End Class

Apr 4 '06 #1
1 1044
Um... no... if your WebFormB had a static property for the selected tab
index, you could use that, but your pages aren't always there... they
get instantiated and ripped down again when a user requests them, and
besides if you did it that way, all your users would have the same
selected tab, and I assume that's not what you wanted.

If you want to pass user-specific information between pages,
QueryString and Session State are your friends.

Apr 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Mark Rae | last post by:
Hi, Apologies if this is a stupid question - I'm a C# newbie... :-) I have a Windows app with two form: frmConfigReg and frmNewApp. frmConfigReg is the startup form. It has several controls,...
14
by: RL Stevenson | last post by:
What is a reasonable way to manage a complex form with 5 or so tabs with 100 or more controls bound to 5-10 tables in a database? Pasting all those controls, datasets, data adapters directly onto...
6
by: Anil Gupte | last post by:
Hi All: I am looking for general directions on "the right way" to do something, which is very critical to my application. I want to communicate with a SQL server database on a Windows Server...
16
by: edepperson | last post by:
I've been looking for an answer to this problem and have seen the same question posted on other forums... but still no answer. My background is Delphi2 - 7 and I used to do this all the time with...
0
by: Lemune | last post by:
Hi all. I'm trying to build an application that will communicate with web server. My application (in C# 2005) will be communicate with some web application (using PHP). For example, my desktop...
0
by: Lemune | last post by:
Hi all. Sorry that maybe i have post the same question for three times, it because i don't see my post for about 6 hours, so i think maybe my previous post is lost on connection error. I'm...
2
by: Lemune | last post by:
Hi all. I'm trying to build an application that will communicate with web server. My application (in C# 2005) will be communicated with some web application (using PHP). For example, my desktop...
2
by: Macias | last post by:
Hi, Please tell me how I can exchange data between two forms. My main form is Form1, and I display a new form something like this: private void Settings_Click(object sender, EventArgs e) { using...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
2
by: =?Utf-8?B?TWFyaw==?= | last post by:
OK. So I have 3 forms 'A', 'B' and 'C'. 'C' needs to be able to communicate with 'A' or 'B' but never both at the same time (If 'A' is visible, 'B' doesn't exist and vice versa). Is there...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.