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 need to develop a custom data-bound control which will contain, few text-boxes, drop-down lists, labels, and other standard web-server controls. And, I want to be able to load this control from a web page on button click. When the user enters any data to any of its child controls, i should be able to save, and also retrieve when the data-bound control is loaded again. Also, the data in the child control should retain their value on postback. What approach should i follow?
I have two dropdown list boxes I select the first one and I get the index value of what i selected say item number 2,Using that indexvalue I would like to acccess the second dropdown box and get the value of it Both boxes will have the same amount of items in it.
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 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'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.
I'm trying to make a form where the text boxes and titles for each box are created dynamically based on how many array values there are. I have tried a repeater but am a little unclear on how I can get the texbox to bind to one area of and the title to bind to another. This is what I have so far:
...and this is the code-behind with an associated array, arr1:
// Bind Array to Repeater rep1.DataSource = arr1; rep1.DataBind();
This works and adds values where container.dataitem is but how to I make it add one set of array values there and another set of array values where the *x* is?