Click here to Skip to main content
15,887,485 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: file reading and writing problems Pin
StarTrekCafe15-Mar-09 18:06
StarTrekCafe15-Mar-09 18:06 
QuestionNot Gorogrian Calander In Asp.net Pin
Mohamed Ibrahim Omar15-Mar-09 0:25
Mohamed Ibrahim Omar15-Mar-09 0:25 
AnswerRe: Not Gorogrian Calander In Asp.net Pin
Mustafa Ismail Mustafa15-Mar-09 3:49
Mustafa Ismail Mustafa15-Mar-09 3:49 
General[Message Deleted] Pin
Mohamed Ibrahim Omar15-Mar-09 20:43
Mohamed Ibrahim Omar15-Mar-09 20:43 
GeneralRe: Not Gorogrian Calander In Asp.net Pin
Mohamed Ibrahim Omar15-Mar-09 20:43
Mohamed Ibrahim Omar15-Mar-09 20:43 
Questionvb mail project problems Pin
StarTrekCafe15-Mar-09 0:25
StarTrekCafe15-Mar-09 0:25 
AnswerRe: vb mail project problems Pin
Christian Graus15-Mar-09 9:59
protectorChristian Graus15-Mar-09 9:59 
Questiontickets Project Help Pin
StarTrekCafe15-Mar-09 0:11
StarTrekCafe15-Mar-09 0:11 
Hi. got a project where you enter a number of tickets, the number of tickets, and then if you add a check box, the code for the credit card, then select from a combo box. the general price for this event is $15 and the awards ceremony is $25. then the hyper link is invisible until you click the submit button, which then will give the user a wecome message, and the general details. then the hyperlink is visible agaion. my problems, and questions are. know how to evaluate a checkbox and radio buttons, but how to evaluate a checkbox with a variable, then add that to the calculation. 2. to help me get the correct calculations. 3. to help me fix the errors. will paste below. any help, suggestions, or code snippets or samples would be fine. cheers Marvin.

'Program: Tickets
'Programmer: Marvin Hunkin
'Date: Monday Febuary 23 2009
'Description: Selling tickets For A Rodeo


Partial Class Tickets
Inherits System.Web.UI.Page


Protected Sub btnSubmitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmitButton.Click


'Declare Variables


dim decTickets as Decimal = 15
dim decAwards as Decimal = 25
dim decAmountDue as Decimal = 0.0
dim intCounter as Integer = 0
dim tbNumerTextbox as TextBox
dim tbAmountDueTextBox as TextBox
dim decTotalAmount as decimal = 0.0




'Add One to Counter


intCounter += 1


'Calculate Total amount

decAwards = 25
if chkAwardsCheckBox.Checked = True
decTotalAmount =decAmountdue * decTickets + decAwards
else
decTotalAmount = decAmountDue + decTickets


end if

'Format Text Boxes

tbNumerTextbox.text = intCounter.ToString()
tbAmountDueTextBox.text = decAmountdue.ToString("C")
tbNumberTextBox.Focus




End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


if ispostback then
'Do Nothing
else
dim liItemOnetext as New ListItem
dim cboCreditCard as DropDownList

liItemOne.text= "VISA"
liItemOneltext = "AMEX"
liItemOneltext= "MasterCard"

cboCreditCard.items.add(liItemOne)


end if











dim intCounter as Integer = 0
dim decTickets as Decimal = 15
dim decAwards as Decimal = 25
dim decAmountDue as Decimal = 0.0
dim tbNumberTextbox as TextBox
dim tbAmountDueTextBox as TextBox



'Display Information

intCounter = session("savedNumberOftickets")
decAmountDue = session("savedAmountDue")


decAmountdue = decTickets + decAwards

session("SavedNumberOfTickets") = intCounter
session("SavedAmountDue") = decAmountDue



End Sub
end class

b
AnswerRe: tickets Project Help Pin
Christian Graus15-Mar-09 10:08
protectorChristian Graus15-Mar-09 10:08 
AnswerRe: tickets Project Help Pin
StarTrekCafe15-Mar-09 13:33
StarTrekCafe15-Mar-09 13:33 
AnswerRe: tickets Project Help Pin
StarTrekCafe15-Mar-09 13:35
StarTrekCafe15-Mar-09 13:35 
QuestionLogin Project Problems Pin
StarTrekCafe15-Mar-09 0:02
StarTrekCafe15-Mar-09 0:02 
AnswerRe: Login Project Problems Pin
Abhijit Jana15-Mar-09 2:13
professionalAbhijit Jana15-Mar-09 2:13 
GeneralRe: Login Project Problems Pin
Colin Angus Mackay15-Mar-09 3:05
Colin Angus Mackay15-Mar-09 3:05 
AnswerRe: Login Project Problems Pin
StarTrekCafe15-Mar-09 13:41
StarTrekCafe15-Mar-09 13:41 
Questionproblem in cast value from money to decimal Pin
Sneha Bisht14-Mar-09 23:34
Sneha Bisht14-Mar-09 23:34 
AnswerRe: problem in cast value from money to decimal Pin
Colin Angus Mackay15-Mar-09 3:10
Colin Angus Mackay15-Mar-09 3:10 
Questionasp.net grid view [modified] Pin
PleaseHelpCP14-Mar-09 22:12
PleaseHelpCP14-Mar-09 22:12 
AnswerRe: asp.net grid view Pin
Christian Graus14-Mar-09 22:36
protectorChristian Graus14-Mar-09 22:36 
GeneralRe: asp.net grid view Pin
Alok Sharma ji15-Mar-09 17:55
Alok Sharma ji15-Mar-09 17:55 
Questionproblem in updating database via datagrid Pin
rosae61914-Mar-09 21:28
rosae61914-Mar-09 21:28 
AnswerRe: problem in updating database via datagrid Pin
Christian Graus14-Mar-09 21:44
protectorChristian Graus14-Mar-09 21:44 
Questioncan onblur method of javascript is also possible in c#.net scripting i am trying it but it not works have any similar method there ? Pin
Alok Sharma ji14-Mar-09 11:49
Alok Sharma ji14-Mar-09 11:49 
AnswerRe: can onblur method of javascript is also possible in c#.net scripting i am trying it but it not works have any similar method there ? Pin
Christian Graus14-Mar-09 12:16
protectorChristian Graus14-Mar-09 12:16 
GeneralRe: can onblur method of javascript is also possible in c#.net scripting i am trying it but it not works have any similar method there ? Pin
Alok Sharma ji14-Mar-09 15:28
Alok Sharma ji14-Mar-09 15:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.