Legato.Reborn-
Member
oh god vb..
whyyyyyyyyyyyy
whyyyyyyyyyyyy
Jin34 said:Code:Public Class Form1 ' Class level structure para el arreglo donde estaran los tax rates Public Structure sRates Public intLowerLimit As Integer Public intUpperLimit As Integer Public dblSingleRate As Double Public dblMarriedRate As Double End Structure ' Class level arreglo. Public taxRates() As sRates
Relix said:Public taxRates(intMaxSubscript) As sRates
or
Public taxRates(5) As sRates
Will be hard if they are using commas to delimit each value on every line.wolfmat said:I think the comma comes from a big number, so you might have to either convert differently or check for and skip commata.
Yeah, the commata are probably rather standard CSV delimiters. Sorry then.rhfb said:Will be hard if they are using commas to delimit each value on every line.
00000, 10000, .00, .00
10001, 20000, .06, .05
20001, 50000, .09, .08
50001, 200000, .08, .09
200001, 500000, .15, .12
500001, 999999, .30, .25
SELECT fldCustomerId, fldLastNames, fldFirstName, fldAddress1, fldAddress2, fldCity, fldCountry, fldZipCode, fldCustomerType, fldRemarks, fldDiscountPercent, fldStatus
FROM tblCustomers
WHERE fldFirstName LIKE + '?'
rhfb said:VB.net? Get into design view and setup your schema after making sure you have selected the data source.
For the SQL you can do LIKE '%' + 'your value here' + '%' for a wildcard.
Try adding "Handles btnCustomerMaintenance.Click" to the end of your function declaration.
Does the button variable in your designer file have "WithEvents"? I guess it would look like this
Protected WithEvents btnCustomerMaintenance As Global.System.Web.UI.WebControls.Button
Gives me another error in Web Developer......
Error 3 Handles clause requires a WithEvents variable defined in the containing type or one of its base types. C:\Users\Relix\Documents\Visual Studio 2010\WebSites\Car Repairs Web Version\Default.aspx.vb 7 109 C:\...\Car Repairs Web Version\
Are you using Visual Studio to do this? And did you start a new ASP.Net project? Because yea, that stuff should be really easy to get working :|
I just made a brand new page in a project I'm working on right now, added a button and drop down list, and was able to get the selected value from the drop down after the button was clicked just fine. Are your buttons/dropdowns showing up in intellisense?
You didn't do like a whoopsie where you are declaring your function outside of the scope of your form or whatever, did you?
Not familiar with ASP.NET stuff, but the first error you gave sounded like something might have been out of scope.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApp._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="theButton" runat="server" Text="Click Me!" />
<asp:DropDownList ID="theDDL" runat="server">
<asp:ListItem Value="0">0</asp:ListItem>
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
</asp:DropDownList>
</div>
</form>
</body>
</html>
Protected Sub btnClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles theButton.Click
Dim v As Integer = theDDL.SelectedValue
End Sub
Ok just made a brand new project, tested stuff and this all worked.
Code:<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApp._Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="theButton" runat="server" Text="Click Me!" /> <asp:DropDownList ID="theDDL" runat="server"> <asp:ListItem Value="0">0</asp:ListItem> <asp:ListItem Value="1">1</asp:ListItem> <asp:ListItem Value="2">2</asp:ListItem> <asp:ListItem Value="3">3</asp:ListItem> </asp:DropDownList> </div> </form> </body> </html>
And in the code behind
Code:Protected Sub btnClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles theButton.Click Dim v As Integer = theDDL.SelectedValue End Sub
Does your stuff look anything like that?
Try this in the SQL Query
SELECT [fldChargeAmount] * [fldDiscountPercent] AS calTotalDiscount
FROM [tblOrderCharges];
The [] is just basically letting the query know the exact column/table/ect name, but are only really needed if the column/table name has a special character in it.