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 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 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.
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.
I have an ASP.NET gridview where I allow the user to edit a record. I need to validate multiple fields as one. I need to require that the user either enter a first and last name OR a company name. All three cannot be blank. Most of the sample code I am finding does not address the text boxes only being visible while the gridview is in edit mode. When not in edit mode, the text boxes do not exist so document.getElementById('<%= editFirstName.ClientID %>') throws an error upon page load.
I have a main web page and added a user control inside it. The user control has some textboxes. The problem I have is when I populate the textboxes with the data that is in the DB, they do not show the values. The strange thing is If I change the property of textboxes ReadOnly to TRUE, they show the values. The problem is that I need them to be ReadOnly=FALSE.