473,472 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

A simple page

I have a simple page with a button.

when the button is clicked it creates a new button, all works fine so far

When the second button is clicked it should create a third button, but this
is where it fails.

How should I go about getting this to work

Partial Class test_buttons

Inherits System.Web.UI.Page

Dim bt2 As Button

Dim bt3 As Button

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click

bt2 = New Button

bt2.Text = "Button2"

AddHandler bt2.Click, AddressOf bt2Click

form1.Controls.Add(bt2)

End Sub

Sub bt2Click(ByVal sender As Object, ByVal e As System.EventArgs)

bt3 = New Button

bt3.Text = "Button3"

form1.Controls.Add(bt3)

End Sub

End Class
Dec 30 '06 #1
0 831

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

Similar topics

2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
0
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I...
3
by: ben | last post by:
All, What I have: I have written a VB.net application that uses Access DBs and Make 100s of Excel documents from the data. What I need: I need a Simple ASP.NET Page that will basically pass...
7
by: abcd | last post by:
I am trying to set up client machine and investigatging which .net components are missing to run aspx page. I have a simple aspx page which just has "hello world" printed.... When I request...
10
by: serge calderara | last post by:
Dear all, I need to build a web application which will contains articles (long or short) I was wondering on what is the correct way to retrive those article on web page. In orther words, when...
27
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
4
by: charles | last post by:
I need to send data from a 'form' on an HTML page to an ASP page. The ASP page should 'return' a simple HTML page containing the data from any items submitted, including any hidden items. I...
2
by: Eric | last post by:
Simple problem - binding Visible property of label to Checked property of radiobutton on the same form. How do I do that in VS2005?? Visible="<%# radiob.Checked %>" - DOESN'T WORK It was so...
2
by: Michael7 | last post by:
Hi everyone, I'm new to CSS of course, and have been trying to learn it. However, when I try to pull off something as simple as positioning of text . . . nothing works in my index page. So in...
4
by: RN1 | last post by:
An ASPX page, named LinkButton.aspx, has a single LinkButton & nothing else. The code is very simple: <form runat="server"> <asp:LinkButton ID="lnk" PostBackUrl="Page1.aspx" Text="CLICK"...
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
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
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
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...
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,...
1
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
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...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.