Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 4th, 2006, 08:37 AM
Registered User
 
Join Date: Sep 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to add more file uploads?

Hi all, it's abit difficult to explain but i really urgently would like to ask if anyone knows how to:

when user would like to add more file upload browsers, then when the user click for button, more upload browsers can automatically show on the screen? or maybe, to put it simply, how to automatically show more textboxes when user click on a button that is requesting for more textboxes to be shown?

Must i do it using java script or can i do it with C#? btw, i'm using microsoft visual studio 2005 program to do my website.

Thank you very much!
 
Old October 23rd, 2006, 03:54 AM
Authorized User
 
Join Date: Sep 2006
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hard question :)
Every textBox have an feature called: visible = true/false

I think, maby you can create a bunch of invisible Textboxes, and by Clicking the button, you will open them. it's very simple like on/off switch.


Protected void Button_Click(object sender,System.EventArgs e)
{
     TextBox1.Visible = true;
     TextBox2.Visible = true;
     TextBox10.visible = true;
}

I really don't know how to open a new browser window automatically in c#,
but i do know that JavaScript allows you to do this kind of stuff
Check msdn.com There's a lot of useful information there.
 
Old November 6th, 2006, 06:10 AM
Registered User
 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vikingsunil
Default

Doing it with C# on the server side will be time consuming. If I understand your question correctly, I would advise you to go for Javascript.
Regards
Sunil

 
Old November 8th, 2006, 11:55 PM
Registered User
 
Join Date: Sep 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Asp.Net and vikingsunil,

I've actually managed to make textboxes to be invisible first then i have a 'add more' button to allow user to click and more textboxes. however, the webpage i need to display again with the same number of textboxes the user initiate before he click on my 'submit' button to process the stuffs in that page, i'm unable to capture the number of textboxes he had added. Thus, when the page refresh, it didnt show the additional textboxes the user had requested and filled up but if click on the 'add more' button again, it'll show the textboxes which were filled up previously.

Actually, i'm using the html textboxes. i've tried to use the 'hidden value' but it doesn't seems to be passing any values. so, wonder if any of you know how to deal with the hidden value?

thank you very much





Similar Threads
Thread Thread Starter Forum Replies Last Post
asp uploads red_fiesta Classic ASP Basics 0 October 17th, 2007 04:28 AM
File Uploads seananderson Classic ASP Basics 1 November 14th, 2006 12:29 PM
How to add more file uploads? fyp4135 ASP.NET 2.0 Basics 0 October 4th, 2006 09:06 AM
Multiple file uploads felixDa BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 April 17th, 2006 10:37 AM
How to add jar file JBuilder9 smartravi Apache Tomcat 0 April 10th, 2006 09:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.