Ask a Question related to ASP.NET General, Design and Development.
-
Victor Garcia Aprea [MVP] #1
Re: Create Textboxes at run time.
Hi Kenneth,
If you want to create server-side controls, then its just not that simple,
although its not difficult at all. You could take a look at some of the
tutorials on [url]www.asp.net[/url] and the docs on how to create/use/fire events/etc
in controls. Basically it will go something like this:
[C#]
//Create a control, in your case it may be HtmlInputFile
TextBox tb = new TextBox();
//Set some properties
tb.Text="blah";
//Get a reference to the server-side form
Control frm=FindControl("FormID");
//Add the dynamically created control to the form
frm.Controls.Add(tb);
--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
[url]http://obies.com/vga/blog.aspx[/url]
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.
"Kenneth Keeley" <kenkeeley@hotmail.com> wrote in message
news:uEj7EzoSDHA.1556@TK2MSFTNGP10.phx.gbl...then> Hi,
>
> I have a page that asks the user how many files they wish to upload and> when they click the ok button they get the same page containing that many
> file boxes. Each file boxes has an Id of something like myFile1, myFile2,
> etc. This was ok to create in asp but how can I create the same page in
> ASP.Net. A sample would be great
>
> Here is some ASP code
> For x = 1 to NoPages
> %>
> <INPUT NAME="File<%=x%>" TYPE="file">
> <%
> Next
>
>
Victor Garcia Aprea [MVP] Guest
-
Tracking create and change time
Hi, in the MySQL documentation up to version 5.1 the page "Data Types -> .... -> TIMESTAMP Properties as of MySQL 4.1" states: "It is not... -
Create Columns at run time
if you place a datagrid on a form and then, in Property builder, check the box saying Create Columns at run time. An then do a SQL Select into a... -
How to create a session time out when the user logsout.
Try this code in your Application.cfm template: <CFAPPLICATION NAME="whateverYouWant" SESSIONMANAGEMENT="YES" LOGINSTORAGE="session"... -
Dynamically create non-fixed number of TextBoxes in Composite Control
Hi, I have a composite control(TextBoxControl.cs) in my DynamicTextBox.aspx. On the Page_Load of the DynamicTextBox.aspx page, I am calling a... -
80 pages to create!!! - how can i save some time
Sounds like something that might benefit from incorporating a database. That way you would just need one page that reads in a url parameter and...



Reply With Quote

