I have two text boxes starttimeInput and endtimeInput that have regularexpression validators to only accept input of time variables (11:00 am, 12:15 pm, etc) and then a durationLabel where I want to calculate between the start time and end time and present it to the user as minutes. I first convert the text to date and so I think I did that with the following:
I have two text boxes called starttime and endtime which are datetime sqldbtypes that I want to subtract the value to show in a duration label. I know that you can do a subtraction with datediff in t-sql to find the time difference, and I'm wondering if that's the best way to approach this. Here is the code from my default.aspx.vb page:
I saw this thread but it doesnt quite cover what I'm looking for:[URL]I have two text boxes that will have a start time and an end time and what I want to do is to calculate the "duration" of the time between them while also accounting if a time starts before midnight on one day and ends on the next day (or any other day for that matter.) Then those values will be put into a SQL server database stating just the "duration."
Using C# and SQL as the database.I have a page with a gridview and some text boxes and drop down list boxes. A user selects a record from the grid view I query the database and fill the text boxes and drop down list boxes.
Some fields get updated periodincally thus there is no data in those fields in the database until some time.
A strange thing happens.When filling data some text boxes gets a one tab spacing .
I am trying to figure out how to get the text value from each textbox on a page that has a dynamically created number of text boxes. I need to store that value in a database row. I guess what i need is to be able to store the text box values in a collection or arrary of some sort and then be able to use textbox(i).value or something of that nature. Not really sure where to begin.
im using asp.net mvc. how can I allow users to enter html into a textbox. im seting validaterequest to false and still getting this error:A potentially dangerous Request.Form value was detected from the client (Summary="<a>"). i know its not recommended etc, but it's for internal use.
Is it possible to set the start location of all these text boxes to be the same? Currently Two and Three are aligned together, but one is not. They are all inside their own div tags as well, not sure if that will matter. The only thing that does matter is the start of each text box needs to be aligned.
I hope this is in the right sections....if not please feel free to move it. Does anyone here have examples of how to create multiple text boxes dynamically based on a search result? For example A table has 5 rows. how do I output to the screen 5 text boxes? and then get their details later? (so in a week if there are 15 rows in the table , then 15 text boxes are output) also what would be a good search term on Google for this so I can try and find other examples as the search terms i was using returned zip
I want to display the net amount of a calculation in two text boxes
if netamount = 45.60
first textbox should show rounded value and next textbox should show what is rounded.
I have earlier done this with c by a manual progam of rounding and now my manager dont want me do something like that because he believes c# has all math in build fucntions. So please help me friends.... I want to get the value that is rounded not numbers after the decimal i want to round a number with 10 precisions like 45.8456789990 and get a result like 46 in one textbox and 85 in another.
The asker has a number like double pi = 3.14159265d; and wants to end up with two message boxes after the fact: [ Whole Number] 3 and [2 Decimal Places] 14 and he wants to know how to best achieve this affect. He only knows that he will be given a double, but he does not know whether that number will have fractional values.
I have a dropdown list which include "yes" and "no". When I click "yes", then there have to be 2 text boxes visible, just below the dropdownlist. If the user selects "no" in the dropdownlist, then the 2 text boxes have to disappear again.
User enters values into text boxes (personal information etc.) and then presses a save changes button. The values in these text boxes get stored in an SQL database. The problem I have is that when updating the database using the values from the text boxes, the page refreshes and the values in the text boxes are lost (or rather they return to the values that are already in the database as the data from the database is loaded into the text boxes on Page_Load). When I update the database using valuse stored in variables it all works fine. What is the best way to update with the values from the text boxes?
I'm very new to ASP.NET, how would it be possible to have a complete form with, let's say, 10 text boxes. Once the page is displayed, the user would only see the first textbox. After the user has input data into that box, the second textbox would appear. After data is input into the second textbox, the third textbox would appear and so on. I know it probably has something to do with Postback but I cannot find anything on this scenario.
I have a page that allows users to upload photos and when they click the upload button it renders a few textboxes used to change the photo's information and also the displays the photo. After they are done upload photos, they can then insert all the information in each of the textboxes. Then users click the Upload button and it takes all the information and places it in the database. The problem is that when I say "get the text from these textboxes" using the textbox IDs, it tells me that those textbox IDs are not in the current context.
In my application I am using a login screen. While a new user registers he has to fill the First name and Last name. There is a user search option. The details of the users will be shown in the user details page. Some users try to add html tags like </td></tr> with first name and last name. So after rendering from DB the page alignment is breaking. How to fix this problem?? How can I avoid html tags while entering the user details?