473,804 Members | 4,217 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

creating multipls textbox at runtime using class file

6 New Member
hi
how to add MULTIPLE TEXTBOX at runtime using CLASS FILE

i tried using this code for creating textbox but it did not work
textbox t=new textbox();
t.id="mytextbox ";
panel p=new panel();
p.controls.add( t);

i want it using class file pls help its very urgent...

thanks in advance to all
Nov 30 '08 #1
5 2329
adarshyam
31 New Member
u mean dynamically?? i dunno class files n al but i ll give u wat i hav done to create textboxes according to users input ..

put this in button click as well as in page load to make it work..

Dim textdynamic6 As New ArrayList()

Dim TxtDyn6 As TextBox()
ReDim TxtDyn6(textbox 1.text)
For n As Integer = 0 To textbox1.text - 1

TxtDyn6(n) = New TextBox
TxtDyn6(n).Enab leViewState = True
Panel6.Controls .Add(TxtDyn6(n) )
textdynamic6.Ad d(textdynamic6)
TxtDyn6(n).Widt h = 60

Next
Dec 1 '08 #2
adarshyam
31 New Member
and pls help me .. i ve posted a question after this
Dec 1 '08 #3
divyasrinivasan
6 New Member
guys i want in C# not in Vb....ya i Meant dynamically.... .pls reply its urgent pls
Dec 1 '08 #4
adarshyam
31 New Member
divya,
thr s a free tool available for conversion.. jus google vb.net to C# n u ll get tat.
Dec 1 '08 #5
divyasrinivasan
6 New Member
buddy i tried it..lot of errors r coming i donno basic of vb...pls instead of giving these reply's give me the solution...
Dec 1 '08 #6

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

Similar topics

15
6753
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use javascript or vbscript it works. I will appreciate any help. I do the following (C#):
3
1898
by: Seth | last post by:
I have been trying to create a mock httpcontext for the purpose of unit testing. I have a class, Customer, that uses cookies. I have set it up to be able to take a httpcontext as a parameter in an overloaded constructor. I have seen a few references to people that have created mock httpcontexts but I can not seem to get it to work. This is what I have right now, it is the result of working backwards from httpcontext and trial and...
2
2903
by: Anand Sagar | last post by:
I have a Panel1 and button1 on my webform. At runtime, I create 2 textboxes. I do it at the Page_Load event. I put the code within the " If Not isPostBack" For the button click event, I will do a post-to-database coding and then show the same page again. I put EnableViewState = True for the textboxes. In the Page_Load if I dont use the IsPostBack checking, the code works fine. The button shows that the code has been fired and the page...
2
2016
by: DaWoE | last post by:
Hi all, I'm fairly new to ASP.NET. What i want to do is creat a online registration form. On the first step is getting the users details and the number of people he wants to register. Based on the number of people i want to create a form where he can enter the persons details. For example he wants to register 3 people. Then the second step of the registration would have to be like this :
8
3529
by: tshad | last post by:
I cannot seem to get the asp:textbox to use classes. Style works fine. I am trying to set the textbox to act like a label in some instance so it doesn't have a border, readonly and the background is grey. I have a class set as: ..table2Label{ border-style:none; background-color:#F6F6F6; }
12
3179
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without restarting the application. What I did was to create an AppDomain that loaded the plugins and everything was great, until I tried to pass something else that strings between the domains...
4
2163
by: George Ter-Saakov | last post by:
I am adding some functionality to HtmlInputText so i derived my class from it. The problem is when i switch page to desing mode the VS shows an error and do not render control. Unable to cast object of type 'System.Web.UI.Design.HtmlIntrinsicControlDesigner' to type 'System.Web.UI.Design.ControlDesigner' Not sure how to fix it and make it work in design time
0
1339
by: Bomac8 | last post by:
I have a text file with "|" as a delimeter with three (3) fields XXX-12345|\\YYYYYYY|\\ZZZZZZZZ I need to read these files into an output folder. The problem that I'm having is that I need to create folders with the first part of the files (xxx-12345) and place the files \\YYYYYYY AND \\ZZZZZZZZ in this folder. Here is the code that I have so far.. Imports System.IO Public Class frmRedaction_Copier Inherits...
3
4439
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine when iam using a normal web page... but can't in content page.... Code in Master Page <%@ Master Language="C#" AutoEventWireup="true" CodeFile="submaster.master.cs" Inherits="submaster" %> <%@ Register Assembly="AjaxControlToolkit"...
0
9707
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9585
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10586
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, 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...
0
10338
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 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...
1
7622
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 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...
0
5525
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
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 we have to send another system
3
2997
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 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...

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.