Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 January 30th, 2006, 08:37 PM
Registered User
 
Join Date: Jan 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sales Tax

Hello! I need a page that looks like this...

Shirt $16.50 QTY (i need a text box here for quantity)

Hat $12.50 QTY (i need a text box here for quantity)

(i need a submit button here)

I need labels for the items and a function to calculate sales tax so that when I hit the submit button it will display the total including tax. The text boxes will be used to enter the number of shirts and hats and. Any help will be greatly appreciated.

~Rachel

 
Old January 31st, 2006, 12:15 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

What do you have so far?

 
Old January 31st, 2006, 02:55 AM
Registered User
 
Join Date: Jan 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is what I have so far. The sales tax has to be 8 percent. I have to have labels for the items (shirt and hat) and a function that calculates the tax. I hope that helped!



<script runat="Server" language="VB">
Sub Page_Load()

Dim strArrayDetails(2) As String
Dim intLoop As Integer


strArrayDetails(0) = text1.Text
strArrayDetails(1) = text2.Text


Message1.text = CStr(strArrayDetails(0))
Message2.text = CStr(strArrayDetails(1))


End Sub
</script>

<html>
  <head>
    <title>Text Box Example</title>
  </head>
  <body>
    <asp:label id="message1" runat="server" />
    <br />
    <asp:label id="message2" runat="server" />
    <br />

    <form runat="server">
    <table>
    <tr>
    <td>
    Shirt $16.50 QTY
    </td>
    <td>
     <asp:textbox id="text1" columns="1" runat="server" />
    </td>
      </tr>

    <tr>
    <td>
    Hat $12.50 QTY
    </td>
    <td>
      <asp:textbox id="text2" columns="1" runat="server" />
    </td>
      </tr>
    </table>
      <br /><br />
      <input type="Submit">
    </form>
  </body>
</html>


 
Old January 31st, 2006, 02:57 AM
Registered User
 
Join Date: Jan 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm pretty familiar with HTML but ASP.net is completely new and foreign to me! Your help would be greatly appreciated!

 
Old January 31st, 2006, 10:43 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

   Since you seem to be completely new to ASP.NET, I would suggest getting a beginner's book. Also, there are many examples and tutuorials on line. This forum is to help once you get started and if you run into problems. What you are asking for is for us to write the code for you. Yes, we can do that, your example is not hard, but you will never learn that way. Get a good begginer's book(Wrox books are great), and go through some simple examples

 
Old January 31st, 2006, 10:54 AM
Registered User
 
Join Date: Jan 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I actually do have a book and it doesn't explain in it how to connect the quantity (text boxes) with the price. I wouldn't mind someone writing it for me...I would even pay them.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Tax RaCheer ASP.NET 1.0 and 1.1 Basics 2 February 3rd, 2006 03:44 PM
TAX / VAT Calucating DB crmpicco MySQL 6 September 12th, 2005 10:09 AM
TAX Calculation crmpicco Classic ASP Databases 0 June 8th, 2005 05:42 AM
Table for sales forecast hosefo81 MySQL 0 November 25th, 2003 10:29 PM





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