Hello.
Sorry me, if it's some basic question, but I'm new in ASP.NET:)
How do I show the othe web form from my code?
I mean I have a button on form "A" and I want to go to form "B" when I click
on the button on form "A"?
Thank You. 4 2188
Hi,
You need to create a click event for your button and do a
Response.Redire ct():
Private Sub Button1_Click(B yVal sender As Object, ByVal e As
System.EventArg s) Handles btnButton1.Clic k
Response.Redire ct("PageB.aspx" )
End Sub
Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight
"Dave" <da*********@ho tmail.com> wrote in message
news:%2******** *******@TK2MSFT NGP15.phx.gbl.. . Hello. Sorry me, if it's some basic question, but I'm new in ASP.NET:) How do I show the othe web form from my code? I mean I have a button on form "A" and I want to go to form "B" when I
click on the button on form "A"?
Thank You.
you can use response.redire ct("PageB.aspx" ) if the button runs at server or
alternatively call a javascript function which makes location.href =
"pageB.aspx ".
HTH
srini
"Dave" wrote: Hello. Sorry me, if it's some basic question, but I'm new in ASP.NET:) How do I show the othe web form from my code? I mean I have a button on form "A" and I want to go to form "B" when I click on the button on form "A"?
Thank You.
OK, it's work :)
But now I have one more question:
I want to make message window what I mean:
I want to creat some form "B" and put a label on it, then from form "A" I
want to show form "B" with my text on label, I must to be able to set the
text of label on form "B" from form "A".
How ca I do this?
Than You.
"Ken Dopierala Jr." <kd*********@wi .rr.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. Hi,
You need to create a click event for your button and do a Response.Redire ct():
Private Sub Button1_Click(B yVal sender As Object, ByVal e As System.EventArg s) Handles btnButton1.Clic k Response.Redire ct("PageB.aspx" ) End Sub
Good luck! Ken.
-- Ken Dopierala Jr. For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight
"Dave" <da*********@ho tmail.com> wrote in message news:%2******** *******@TK2MSFT NGP15.phx.gbl.. . Hello. Sorry me, if it's some basic question, but I'm new in ASP.NET:) How do I show the othe web form from my code? I mean I have a button on form "A" and I want to go to form "B" when I click on the button on form "A"?
Thank You.
Hi,
The easiest way is to have a textbox on your form "A". Then in the button
code put this:
Session("MyText ") = Textbox1.Text
Then in the Form_Load() event of your form "B" set your label:
Label1.Text = CStr(Session("M yText"))
Session("MyText ") = Nothing 'Clears the session to release server resources.
Alternately you could send it via a QueryString:
In the button code:
Response.Redire ct("PageB.aspx? MyText=" + Textbox1.Text)
In the Form_Load()
Label1.Text = CStr(Request("M yText"))
For now I would use the Session object until you learn how to Encode query
strings that include spaces and special characters. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight
"Dave" <da*********@ho tmail.com> wrote in message
news:O$******** ********@tk2msf tngp13.phx.gbl. .. OK, it's work :) But now I have one more question: I want to make message window what I mean: I want to creat some form "B" and put a label on it, then from form "A" I want to show form "B" with my text on label, I must to be able to set the text of label on form "B" from form "A". How ca I do this?
Than You.
"Ken Dopierala Jr." <kd*********@wi .rr.com> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. Hi,
You need to create a click event for your button and do a Response.Redire ct():
Private Sub Button1_Click(B yVal sender As Object, ByVal e As System.EventArg s) Handles btnButton1.Clic k Response.Redire ct("PageB.aspx" ) End Sub
Good luck! Ken.
-- Ken Dopierala Jr. For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight
"Dave" <da*********@ho tmail.com> wrote in message news:%2******** *******@TK2MSFT NGP15.phx.gbl.. . Hello. Sorry me, if it's some basic question, but I'm new in ASP.NET:) How do I show the othe web form from my code? I mean I have a button on form "A" and I want to go to form "B" when I click on the button on form "A"?
Thank You.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: dp |
last post by:
I am new to VB.NET and I have a simple question. How do I show a form
from a command button click event? The code I have below is not
working. I am trying to show the form frmAgent. What am I missing?
Private Sub cmdNewAgent_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmdNewAgent.Click
Dim frm1 As New frmAgent()
frm1.Show()
Me.Hide()
End Sub
|
by: genetic.error |
last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up
before...
The VS.Net MSDN file seems to state that the following should work:
Form1.Show
Form1.Visible = True
Form1.Hide
Form1.Visible = False
Load (Form1)
|
by: Ajai Kumar .R |
last post by:
Hai all,
I've two or more forms on my app.
My requirement is, Have to show the first form asa the user press a button
have to hide the first form and show the second form. If the user press the
escape key on second form, this should be hidded and should show the first
form.... Can some one guide me how to achive this... (MUST USE SHOW & HIDE
FORM PROPERTIES). I tried to achive this using the below code but when i
check the Windows->Task...
|
by: WindAndWaves |
last post by:
Hi Gurus
I was wondering if you can send me in the right direction:
I have a table with about 300 rows. I want to make all of them invisible
and when a user enters a code in a form then make selected ones visible.
At the moment, I am doing it as follows:
www.corstorphinehouse.com/d/avail.html
|
by: cefrancke |
last post by:
I have set the Startup properties to the following...
All menus, toolbars, etc are turned off plus these are unchecked
Allow Full Menus
Allow Built-in Toolbars
Allow Default Shortcut Menus
Allow Toolbar/Menu Changes
Use Access Special Keys
| |
by: Homa |
last post by:
Hi
I'm working on a program that will have 3 forms: a main form, a status
form and a sub-form.
The main form and status form are always appear, and my sub-form is a
singleton (for performance issue).
As usual, I have two ways to display the sub-form: Show() and
ShowDialog().
|
by: Tim Smallwood |
last post by:
Hi,
This is probably a stupid question, but I can't seem to get a form to
show / load? In the older versions of VB I'd use frmMyform.show / load
myForm, etc? I looked at the help file and it showed me how to create a
new form in code and then load it, but I want to load a form when a user
clicks a button.. and hide the form that currently has focus..? I can't
seem to find this simple task in the help file.. Any help would be
greatly...
|
by: yzi |
last post by:
I have a list form and a detail form .
Before, I open the List form, use form.showDialog(),then I click List Item
and open the Detail Form by form.show().
now , user need when the list form show, auto open the first Item Detail .
I add detail form.show() in list form.form_load event , but problem.
some idea?? help me
|
by: Zytan |
last post by:
I have public methods in a form. The main form calls them, to update
that form's display. This form is like a real-time view of data that
is changing.
But, the form may not exist (it is created / destroyed at user
request). I can check form != null to prevent incorrect access.
But, the form could disappear immediately after the check, before the
method is run. Or someone could click 'close' when it's in the middle
of an update. ...
|
by: Delphiscn |
last post by:
How to show a ABOUT Form????????
Hello Everyone:
I use C# want to Create a Project. In my project. there are two
forms. One is main form, and another is a about form. In the about
form there are some information about my project. such as author's
information, product support and so on.
Now, I add a button in the main form, I want that if the user click
the button. It will show the about form . In button's event . the code
like this:
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |