Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 June 21st, 2007, 05:32 AM
Authorized User
 
Join Date: Mar 2007
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default Addition of Textboxes

I have generated Textboxes dynamically
I need the addition of these textboxes(value in Textbox)

Textboxes created dynamically like******************
for(int i=0;i<3;i++)
{
     Textbox t = new Textbox();
     t.Location = new Point(20,i*20);
}

Above code generates 3 textboxs dynamically
I want the addn of values entered in the textboxes

Please help me









 
Old June 21st, 2007, 05:31 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Not sure what you mean but you could do something like this:

foreach(Control ctrl in <parentControl>.Controls)
{
   if(ctrl is TextBox)
   {
      TextBox t = (TextBox)ctrl;
      string s;
      s = t.Text;
   }
}

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old June 23rd, 2007, 10:59 AM
Authorized User
 
Join Date: Mar 2007
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<html>

<head></head>

<body bgcolor="#CCFFFF">
<table width="60%" height="40%" border="3" align="center" bgcolor="#99CCFF" >

    <form method ="post" action="">
        <tr><th colspan ="2"><h2>APPLICATION FORM</h2></th> </tr>

        <tr><td>NAME</td> <td><input type="textbox" name="n1" value="Mr/Ms" size=40></td></tr>

        <tr><td>ADDRESS</td> <td><textarea rows="3" col="50" name="a1"></textarea></td></tr>

        <tr><td>CONTACT NO</td> <td><input type="textbox" name="t1"></td></tr>

        <tr><td>CITY</td> <td><select name="c1">
                    <option>PUNE</option>
                    <option>MUMBAI</option>
                    <option>MADRAS</option>
                    <option>DELHI</option>
                </td>
                </tr>

        <tr><td>HOBBIES</td> <td><input type="checkbox" name="chess" checked>Chess
                        <input type="checkbox" name="cricket">Criket
                        <input type="checkbox" name="foot">Football
            </td>
        </tr>

        <tr><td>MARTIAL STATUS </td>
                    <td><input type="radio" name="r1" checked>Married
                    <input type="radio" name="r1" >Unmarried
                </td>
        </tr>

        <tr><td><input type="SUBMIT" value="SUBMIT"></td>
            <td><input type="RESET" value="RESET"></td>
        </tr>
    </form>

</table>
</body>
</html>

 
Old June 23rd, 2007, 04:49 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

ok?? And what is your question?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hexadecimal Addition madanshah16 XSLT 1 July 31st, 2007 07:21 AM
Addition of Textbox in a UserControl rhd110 General .NET 0 July 12th, 2007 06:05 AM
Addition in javascript m_soni21 VBScript 2 December 19th, 2006 11:06 AM
addition to errata luciano991 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 August 25th, 2006 08:29 PM





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