Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Can web forms communicate with one another directly?

 
Thread Tools Search this Thread
Old 04-04-2006, 03:34 AM   #1
Default 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





Dean Slindee
  Reply With Quote
Old 04-04-2006, 10:11 AM   #2
Flinky Wisty Pomm
 
Posts: n/a
Default Re: Can web forms communicate with one another directly?
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.



Flinky Wisty Pomm
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make DVD that skips Menu and plays main movie directly raining Software 4 06-21-2007 02:09 PM
Capture HD video directly from HDMI uncompressed Smarty DVD Video 149 03-13-2007 03:04 AM
Multiple forms on datagrid Ranjandada Software 0 07-28-2006 06:22 PM
Charles Band Forms Wizard Entertainment Stacy DVD Video 1 05-10-2005 11:44 PM
DVD player that will play .dvr-ms or .ts files directly or fast converter Rod Speed DVD Video 18 03-25-2005 11:31 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46