Web Forms :: Make An HTML / ASP Page Where A User Puts In Data, Either In Text Fields Or Selection Boxes
Oct 15, 2010
I'm new to ASP.NET. I 'm trying to figure out how to make an HTML/ASP page where a user puts in data, either in text fields or selection boxes, and on clicking a submit button all of there selected data gets dropped either into a Access 97 Db or an excel spread sheet. Are there any examples out there of this? Is there a place that has already created this and I can just look and the code and figure it out for myself?
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'm new to ASP but not programming in general. What I'm trying to accomplish is to have an ASP page where an EU can make some selections and input some text into fields and, upon clicking a submit button, have that input transferred to an access (.Mdb) database's table. I'm not sure how to go about this though. I don't know if it would be an SQL line or a dump to a different file type and then to Access (.Mdb) or something I don't know about.
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.
Dim objDatabase As New database objDatabase.OpenSQLConnection() Dim objAdapter As SqlDataAdapter Dim objDataset As New DataSet Dim objAdapter1 As SqlDataAdapter Dim objDataset1 As New DataSet Dim objAdapter2 As SqlDataAdapter Dim objDataset2 As New DataSet
i am using above code to generate dynamicaly textbox into grid view. I have 3 fix coloumns from database which i fetch at start of code.
Then i assigned it to datatable. in datatable according to Listbox item count i added more coloumn as per listbox items count.
then that datatable i i gave as datasourse to gridview. Now i inserted dynamicaly textbox to gridview in respective coloumn.
But after refreshing page all textboxes disappears....
I was looking for some better way of coding to populate all text boxes and make them visible once a button is clicked, is there a better way of doing this than I describe below?
I have a letter like format on a page with labels displaying address, name etc and it was recommended that on this page some of the information should be able to be edited. The idea I had was to keep the labels displaying the information but then when the edit details button is clicked the labels disappear, text boxes will appear and be populated with the same text as the label to allow the user to edit the details.
I seem to repeating lines of code but changing one thing each time
on page load
Dim Sname As String = Request.QueryString("Name") lblStuName.Text = Sname tbStuName.Text = Sname tbStuName.visible=false Dim Saddress As String = Request.QueryString("Address") lblAddress.Text = Saddress tbAddress.Text = Saddress tbAddress.visible = false etc... on edit button tbStuName.visible=true tbAddress.visible = true etc..
on the save button
sqlStatement = "UPDATE StuTable SET Name = '" & lblStuName.Text & "', Address = '" & lblAddress.Text
My code seems very repetitive in many parts, I was looking for a better coding style to do this can anyone suggest a better way to do it? Is my idea sound right way to do this or can anyone suggest a better way it can be implemented?
I have several text boxes on a page that need to be filled out. When users fill out those boxes they need the ability to enter in bold, italics, superscripts, and trademarks. It has been recommended to use a WYSIWYG. The problem with a WYSIWYG is that it is all tied to 1 large text box. I just need a panel on the side that can hold Bold, Italics buttons to transform whatever text the user has selected to be Bolded/Italicized and then I need to be able to add in predetermined Superscripts and Trademarks where the cursor is as defined by the user. Now this would work with a WYSIWYG but I need this to apply to several (sometimes up to 10 fields on a page) text boxes on a page.
i have just started making an asp document using c# codes
right now i have a droplistbox in my design.. when i select others, a text box will appear and allow user to enter the new email address. however, i would like the text box to appear invisible to the user when he enters this asp page initially. how do i go about doing it?
just another question.. Supposed that if the user chooses "Others" and entered a new email address in the textbox and i want him to be able to see this new email address as an option in the future when he runs this asp file again. is it possible not to set up a SQL server for my application? or can i just use some variables to set as that?
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?
Really getting better with VS, but I've mostly been displaying data. I'm on a new project and now and I have a lot of data entry forms to create. I created a form to enter data into an access db and got it working. I thought it would be cool to add an edit button that fired a gridview to load on the same page, under my original forms, so that that they could load up the data and edit or delete mistakes. But when I try to update the gridview, it also tries to post the original forms (text boxes), which fail because there is no data in them, and I get an error.
What is the proper way to handle this in asp.net? I'm sure this is kind of a common issue. I've done some searching, but the search terms, like forms and gridview, are kind of generic and I'm not coming up with anything useful. I just need a more experienced person to point me in the right direction and I'll get it figured out.
I am using that standard asp.net menu system and I have it linking to an SQL view via XML. All that stuff works fine but when I try to add a separator image to the menu it adds the image below the text. It looks like it is wrapping the image down to the next line.
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.
above string i have displayed in front end thrgh response.write i.e by assigning string abc to viewstate. also i am tryin to genetrate above input fields from database , so i have to make it dynamic in a loop. so when a user updates any of those dynamically created fields i need to retreive those values in a loop
something like this :
field1.text , field2.text ......so on till fieldn.text ....i want to assign these values to array
string arr1 = new string[nooffields]; arr1[i] = fieldi.text;
I dont know whether this simple task or not, but I tried to search in google but couldn't find anything.
I've a asp.net form and user enters some data in the text boxes provided. Whenever user submits the form, browser will save that form data. I don't want this form data to be saved in browser. How can I restrict the browser saving this form data without touching the browser settings?
Application is developed using asp.net and normal text boxes are used here.
I have the following code, i add code for required validator, but when you make selection from dropdown to create the table, the page generates an error. Should the logic be somewhere else to add it to the table? i mean, dont they have to be there so when you submit the form, it fires the validation?
I am making an search form from where the person generate its monthly report.I have 4-5 field likeregion,state,city,employee_name,Product_name.with all textboxes i am using ajax:modalpopupextender. Its working perfectly but after 4-5 selection user is able to access the back page info along with the modalbox.I dont now why its happening????
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?