473,493 Members | 4,319 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Changing Label property

Hi,
I'm working on a project that I develop with ASP.NET/MS SQL/C#. When I check
username and password in WebForm1 and they are wrong, I forward the users to
another WebForm2 which have a Label. I'd like to change the Text property
of this Label not in OnPageLoad function of the WebForm2. I'd like to do
that in WebForm1. How could be accoplish that?

Thank you in advance!

Viktor
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.
Nov 18 '05 #1
3 941
Web server processes one page at the time. When you navigate to WebForm2,
WebForm1's gone. The only thing it can do is to pass new text via one of the
standard ways of passing parameters between pages.

Eliyahu

"Viktor Popov" <vi****@yahoo.com> wrote in message
news:uB**************@tk2msftngp13.phx.gbl...
Hi,
I'm working on a project that I develop with ASP.NET/MS SQL/C#. When I check username and password in WebForm1 and they are wrong, I forward the users to another WebForm2 which have a Label. I'd like to change the Text property
of this Label not in OnPageLoad function of the WebForm2. I'd like to do
that in WebForm1. How could be accoplish that?

Thank you in advance!

Viktor
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.

Nov 18 '05 #2
You cant,

When you are executing page1 a page2 instance does not exist yet.
You can pass the value as a parameter though. or in a session variable.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Viktor Popov" <vi****@yahoo.com> wrote in message
news:uB**************@tk2msftngp13.phx.gbl...
Hi,
I'm working on a project that I develop with ASP.NET/MS SQL/C#. When I check username and password in WebForm1 and they are wrong, I forward the users to another WebForm2 which have a Label. I'd like to change the Text property
of this Label not in OnPageLoad function of the WebForm2. I'd like to do
that in WebForm1. How could be accoplish that?

Thank you in advance!

Viktor
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.

Nov 18 '05 #3
Meaning -- use WebForm1 to populate a Session variable with the
value of the label's text. When WebForm2 is loaded read the
Session variable and assign the value to the label on WebForm2.
--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:u3**************@TK2MSFTNGP10.phx.gbl...
Web server processes one page at the time. When you navigate to WebForm2,
WebForm1's gone. The only thing it can do is to pass new text via one of the
standard ways of passing parameters between pages.

Eliyahu

"Viktor Popov" <vi****@yahoo.com> wrote in message
news:uB**************@tk2msftngp13.phx.gbl...
Hi,
I'm working on a project that I develop with ASP.NET/MS SQL/C#. When I

check
username and password in WebForm1 and they are wrong, I forward the users

to
another WebForm2 which have a Label. I'd like to change the Text property
of this Label not in OnPageLoad function of the WebForm2. I'd like to do
that in WebForm1. How could be accoplish that?

Thank you in advance!

Viktor
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.


Nov 18 '05 #4

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

Similar topics

3
11427
by: Pavan Arise | last post by:
Hi all.. This may seem simple..but I am stuck here! I have a frame in which I have a label. I was trying to change the caption of that label via code (I mean at runtime & not design time). But...
5
10516
by: Sambo | last post by:
I have two forms, frmMain and frmSettings. I have a label in frmMain that i would like to change from frmSettings. So when the user clicks the command button in frmSettings then a value from a...
1
3329
by: Henke | last post by:
Hello, I have one ImageButton controls which I initialize in Page_Load and declare on class level. ImageButton save = new ImageButton(); save.ImageUrl = "save.gif" save.Click += new...
7
8918
by: Ed West | last post by:
Hello, I have a simple form with some input boxes. After validation if one fails, then I would like to at the top of the page say something like "The following fields in red are required" and...
3
2653
by: Mike Johnson | last post by:
I'm new to VB.Net and programming. I just brought VB.Net Standard I'm working on a small program for work. I've created two forms the first is named Forms1 and the second is named SettingsForm on...
7
2924
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
6
6863
by: AMP | last post by:
Hello, I have an mdi program with a child form ("A") and another child ("B"). I want to change the text of a label on A by changing an item from a combobox on B. I can code the...
5
3774
by: g6023 | last post by:
Hi All Newbie to C# I am afraid The array of panel dispays OK but I am having problems with accessing the controls within. My panels each have a number of label controls. How do I set, say,...
1
3955
by: Randy | last post by:
I've got an ASP VS 2005 project. I'm trying to figure out how to programmatically change the font of a label. From memory, this was done easily in 2003, but the Font property is read-only. Can...
0
6980
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
7157
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
7364
tracyyun
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...
0
5452
agi2029
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,...
1
4886
isladogs
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...
0
3087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
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...

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.