473,396 Members | 1,864 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,396 software developers and data experts.

help: how to prevent controls from duplicating

Hello,

I'm a junior in using VB.NET.
I encountered the following problem:

I have a form with some buttons (change password, change username, logout
etc.) and below those buttons I have a label that I want to display some
text, depending what button was pressed (i.e. Changing Password, etc.). I
also want at the same time the click event to handle a redirection to the
aspx page I want to load accordingly (i.e. changing password.aspx).
My problem is when I click any of this buttons a new row of buttons is
generated, but they are lower from the original one, with the new text in
the label but behind the loaded aspx (i.e. changing password.aspx), so they
are never actually visible.

I don't know where to check, what to check in the code. I don't know why a
new set of buttons (and the label in question) are generated.
Why the changing of text property for the label doesn't occur in the first
set of buttons? (this is not even a good question)

Thank you for any advice.
Vasilica
Nov 20 '05 #1
6 999
Can you post the code behind one of the button_click events that's causing
this?
"John Smith" <so*****@microsoft.com> wrote in message
news:Q9********************@news20.bellglobal.com. ..
Hello,

I'm a junior in using VB.NET.
I encountered the following problem:

I have a form with some buttons (change password, change username, logout
etc.) and below those buttons I have a label that I want to display some
text, depending what button was pressed (i.e. Changing Password, etc.). I
also want at the same time the click event to handle a redirection to the
aspx page I want to load accordingly (i.e. changing password.aspx).
My problem is when I click any of this buttons a new row of buttons is
generated, but they are lower from the original one, with the new text in
the label but behind the loaded aspx (i.e. changing password.aspx), so they are never actually visible.

I don't know where to check, what to check in the code. I don't know why a new set of buttons (and the label in question) are generated.
Why the changing of text property for the label doesn't occur in the first
set of buttons? (this is not even a good question)

Thank you for any advice.
Vasilica

Nov 20 '05 #2
Hi!

Is it all right if I do it tomorrow? I have the application at work. I
didn't actually expect an answer so soon. However, the click event contains
only two lines: one for changing the label's text and another one to
redirect to another aspx. (I was hired three days ago, the only info I got
regarding this application was its location, and how to upload new
releases).

Thank you,

Vasilica

"William Ryan [eMVP]" <bi**@NoSp4m.devbuzz.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Can you post the code behind one of the button_click events that's causing
this?
"John Smith" <so*****@microsoft.com> wrote in message
news:Q9********************@news20.bellglobal.com. ..
Hello,

I'm a junior in using VB.NET.
I encountered the following problem:

I have a form with some buttons (change password, change username, logout etc.) and below those buttons I have a label that I want to display some
text, depending what button was pressed (i.e. Changing Password, etc.). I also want at the same time the click event to handle a redirection to the aspx page I want to load accordingly (i.e. changing password.aspx).
My problem is when I click any of this buttons a new row of buttons is
generated, but they are lower from the original one, with the new text in the label but behind the loaded aspx (i.e. changing password.aspx), so

they
are never actually visible.

I don't know where to check, what to check in the code. I don't know why

a
new set of buttons (and the label in question) are generated.
Why the changing of text property for the label doesn't occur in the first set of buttons? (this is not even a good question)

Thank you for any advice.
Vasilica


Nov 20 '05 #3
No problem
"John Smith" <so*****@microsoft.com> wrote in message
news:sy********************@news20.bellglobal.com. ..
Hi!

Is it all right if I do it tomorrow? I have the application at work. I
didn't actually expect an answer so soon. However, the click event contains only two lines: one for changing the label's text and another one to
redirect to another aspx. (I was hired three days ago, the only info I got
regarding this application was its location, and how to upload new
releases).

Thank you,

Vasilica

"William Ryan [eMVP]" <bi**@NoSp4m.devbuzz.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Can you post the code behind one of the button_click events that's causing
this?
"John Smith" <so*****@microsoft.com> wrote in message
news:Q9********************@news20.bellglobal.com. ..
Hello,

I'm a junior in using VB.NET.
I encountered the following problem:

I have a form with some buttons (change password, change username, logout etc.) and below those buttons I have a label that I want to display some text, depending what button was pressed (i.e. Changing Password,
etc.).
I also want at the same time the click event to handle a redirection to the aspx page I want to load accordingly (i.e. changing password.aspx).
My problem is when I click any of this buttons a new row of buttons is
generated, but they are lower from the original one, with the new text in the label but behind the loaded aspx (i.e. changing password.aspx), so

they
are never actually visible.

I don't know where to check, what to check in the code. I don't know
why a
new set of buttons (and the label in question) are generated.
Why the changing of text property for the label doesn't occur in the

first set of buttons? (this is not even a good question)

Thank you for any advice.
Vasilica



Nov 20 '05 #4
Cor
Hi John,

You are sending code, but maybe this helps you in between, an aspx page is
stateless, and therefore it starts everytime again.

If the load from a page comes it is executede everytime and therefore is the
property "IsPostBack"

You see it almost always in the load event as
\\\
If Not IsPostBack then
..........
else
.........
end

Have a look at this page, it gives a real clear view on it

http://msdn.microsoft.com/library/de...singstages.asp

I hope this helps?

Cor
I'm a junior in using VB.NET.
I encountered the following problem:

I have a form with some buttons (change password, change username, logout
etc.) and below those buttons I have a label that I want to display some
text, depending what button was pressed (i.e. Changing Password, etc.). I
also want at the same time the click event to handle a redirection to the
aspx page I want to load accordingly (i.e. changing password.aspx).
My problem is when I click any of this buttons a new row of buttons is
generated, but they are lower from the original one, with the new text in
the label but behind the loaded aspx (i.e. changing password.aspx), so they are never actually visible.

I don't know where to check, what to check in the code. I don't know why a new set of buttons (and the label in question) are generated.
Why the changing of text property for the label doesn't occur in the first
set of buttons? (this is not even a good question)

Thank you for any advice.
Vasilica

Nov 20 '05 #5
Hi Cor,
Thank you very much for the hint and for the link. I'll go through it and
try to fix the problem.
Thank you again.

"Cor" <no*@non.com> wrote in message
news:Oc**************@TK2MSFTNGP10.phx.gbl...
Hi John,

You are sending code, but maybe this helps you in between, an aspx page is
stateless, and therefore it starts everytime again.

If the load from a page comes it is executede everytime and therefore is the property "IsPostBack"

You see it almost always in the load event as
\\\
If Not IsPostBack then
.........
else
........
end

Have a look at this page, it gives a real clear view on it

http://msdn.microsoft.com/library/de...singstages.asp
I hope this helps?

Cor
I'm a junior in using VB.NET.
I encountered the following problem:

I have a form with some buttons (change password, change username, logout etc.) and below those buttons I have a label that I want to display some
text, depending what button was pressed (i.e. Changing Password, etc.). I also want at the same time the click event to handle a redirection to the aspx page I want to load accordingly (i.e. changing password.aspx).
My problem is when I click any of this buttons a new row of buttons is
generated, but they are lower from the original one, with the new text in the label but behind the loaded aspx (i.e. changing password.aspx), so

they
are never actually visible.

I don't know where to check, what to check in the code. I don't know why

a
new set of buttons (and the label in question) are generated.
Why the changing of text property for the label doesn't occur in the first set of buttons? (this is not even a good question)

Thank you for any advice.
Vasilica


Nov 20 '05 #6
Hi ,
This is the piece of code behind click event:

----------------------------------------------------------------------------
-----
Private Sub B_user_changepass_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles B_user_changepass.Click

'L_msg.Text = "change password"

Response.Redirect("ChangePassword.aspx")

End Sub

----------------------------------------------------------------------------
-------------------------------------------------

Nothing spectacular, I would say.

I'll read some more documentation these days (another person replied and
gave me a link), hopefully I'm getting a good solution.

Thanks a lot.

"William Ryan [eMVP]" <bi**@NoSp4m.devbuzz.com> wrote in message
news:eS**************@TK2MSFTNGP09.phx.gbl...
No problem
"John Smith" <so*****@microsoft.com> wrote in message
news:sy********************@news20.bellglobal.com. ..
Hi!

Is it all right if I do it tomorrow? I have the application at work. I
didn't actually expect an answer so soon. However, the click event

contains
only two lines: one for changing the label's text and another one to
redirect to another aspx. (I was hired three days ago, the only info I got
regarding this application was its location, and how to upload new
releases).

Thank you,

Vasilica

"William Ryan [eMVP]" <bi**@NoSp4m.devbuzz.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Can you post the code behind one of the button_click events that's causing this?
"John Smith" <so*****@microsoft.com> wrote in message
news:Q9********************@news20.bellglobal.com. ..
> Hello,
>
> I'm a junior in using VB.NET.
> I encountered the following problem:
>
> I have a form with some buttons (change password, change username,

logout
> etc.) and below those buttons I have a label that I want to display some > text, depending what button was pressed (i.e. Changing Password, etc.).
I
> also want at the same time the click event to handle a redirection to the
> aspx page I want to load accordingly (i.e. changing password.aspx).
> My problem is when I click any of this buttons a new row of buttons
is > generated, but they are lower from the original one, with the new text in
> the label but behind the loaded aspx (i.e. changing password.aspx),

so they
> are never actually visible.
>
> I don't know where to check, what to check in the code. I don't know

why a
> new set of buttons (and the label in question) are generated.
> Why the changing of text property for the label doesn't occur in the

first
> set of buttons? (this is not even a good question)
>
> Thank you for any advice.
> Vasilica
>
>



Nov 20 '05 #7

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

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
4
by: Wayne Aprato | last post by:
I have a simple database which was originally written in Access 97. When converted to Access 2000 file format it ran flawlessly in Access 2002. I've just tried to run it in Access 2003 and I am...
3
by: Ken Varn | last post by:
I have created a custom control that derives from WebControl. The custom control assigns other controls dynamically to the Controls collection. Is there anyway that I can recall the lost of...
5
by: Jim Bayers | last post by:
I have a simple page, all that's on it is a datagrid. The datagrid is populated on page_load when it is bound to a datareader. The problem is: when a user refreshes the page, new records are...
1
by: Mark | last post by:
Hopefully somebody can help me with this very frustrating problem. In Dreamweaver I have a template page and a page created from this template called Home.aspx. In Visual Studio I have a class...
4
by: stacy | last post by:
I would like to create 4 tab pages in a tab control. 1 tab is for properties, 1 is for status and 2 of the tabs will have the same controls on them, for settings. The two settings tab pages will...
0
by: dustbort | last post by:
ASP.NET 1.1 I want to enhance the existing web controls to add special data-binding features like provider-consumer relationships and the ability to automatically add validation based on database...
9
by: netasp | last post by:
hi all, how can I populate one aspx form when page is loading based on page ID? for example: loading page A (to search for VB code) would display labels and texboxes, dropdown lists all related...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
3
by: Roshawn | last post by:
Hi, I have a control that derives from the HtmlForm control. The difference is that I can set the action attribute to whatever I desire. This works fine. :-) What I can't seem to do is...
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:
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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,...

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.