473,505 Members | 15,381 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

When a add a new control an event disappear with the control

28 New Member
After i created the control he appear on the screen but when i click in a button
the control disappear!!!
And the syntax for created a neew function is correct?

thanks

Here is the .aspx file:

Expand|Select|Wrap|Line Numbers
  1. <asp:UpdatePanel ID="UpdatePanel5" runat="server" UpdateMode="Conditional">
  2.                         <ContentTemplate>
  3.                                 <asp:Label  ID="lbTest" runat="server" Width="321px" style="left:450px; position: absolute; top: 1px; font-size: 19px;" BackColor="Transparent" Font-Bold="True" ForeColor="Black" Height="23px"></asp:Label>
  4.                            <div id="divReversao" runat="server" style="position:absolute; top:25px; width: 1080px; height: 740px">
  5.                                 <asp:Button ID="btnSave" runat="server" Style="left: 400px; position: absolute; top: 205px" Width="150px" Height="25px" Text="Salvar Reversão" OnClick="btnSalvaReversao_Click" />
  6.                            </div>
  7.                         </ContentTemplate>
  8.                         </asp:UpdatePanel>
  9.  
here is the c# file:

Expand|Select|Wrap|Line Numbers
  1. top = 0;
  2. for(i=0;i<2;i++)
  3. {
  4.               DropDownList drop = new DropDownList();
  5.                                     drop.Style.Add("Left", "130px");
  6.                                     drop.Style.Add("top", top + "px");
  7.                                     drop.Style.Add("font-family", "Arial");
  8.                                     drop.Style.Add("font-size", "11pt");
  9.                                     drop.Style.Add("position", "absolute");
  10.                                     drop.ID = "ddl" + i;
  11.                                     drop.Height = 30;
  12.                                     drop.Width = 150;
  13.                                     drop.Items.Add(i);
  14.                                     divReversao.Controls.Add(drop);
  15.                                     top = top + 40;
  16. }
Apr 1 '08 #1
3 863
pronerd
392 Recognized Expert Contributor
Ummmmm.... This is the JavaScript forum. You have posted ASP and C# code, and mentioned something about an ActiveX control. Do you have a JavaScript question? If not this is not the correct forum.

Also please use code tags when posting.
Apr 1 '08 #2
acoder
16,027 Recognized Expert Moderator MVP
Moved to the .NET forum. Please post in the most relevant forum for your problem/question in future.

Moderator.
Apr 1 '08 #3
Ashlewis
20 New Member
Please specifiy which button causes this behaviour.
And which control dissapers?
also is there any other code behind?
Apr 1 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
3146
by: Martin | last post by:
I run into a problem where an ASP CheckBoxList control disappears after being added to a controlcollection. (Have not tested this with other Controls ...) It takes a WebForm with 3 lines of codes...
5
7347
by: Phil Galey | last post by:
VB.NET 2002 on Windows 2000 SP 3 When I start my program, the NotifyIcon appears in the tray, as it should. However, when I close the program, the NotifyIcon remains until I hover over it with...
13
2055
by: Will Pittenger | last post by:
I have a Control derived class. When the parent of the control changes the control's Location property, the stack overflows. I have not found a way to find out what was on the stack when it does...
1
4004
by: Rhy Mednick | last post by:
I'm creating a custom control (inherited from UserControl) that is displayed by other controls on the form. I would like for the control to disappear when the user clicks outside my control the...
1
2633
by: Nathan Sokalski | last post by:
When testing a form of mine which uses RequiredFieldValidators that have the Display property set to "Dynamic" the ErrorMessage property is automatically removed when an entry is completely typed...
1
1888
by: jjwhite01 | last post by:
I am working on a web form that contains a Calendar control with an image button that makes the calendar appear and disappear. However, I would like to set the visible property of the Calendar...
8
15053
by: Bhujanga | last post by:
I have a form with a tab control on it that has about 5 tabs.When one of the tabs is selected, I want to set the "Visible" property from "No" to "Yes" on a subform that resides on the main form, but...
0
7216
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
7303
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
7367
jinu1996
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...
1
7018
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...
1
5028
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
3187
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
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
407
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.