I'm very new on VWD, but I got the hang of it for the past 2 weeks(thank you for all the videos posted here in ASP.NET),but I'm really weak on the coding part(vb & c#),except for all the sample shown on the tutorials. Anyways, I have a simple project that does insert, update & delete to SQL express using the details view. But to complete my project, I need to add a button that will create an event to restore the very last record inserted in SQL and display it back into the details view for minor modification and nserted again as the newest record with the mod. I'm doing this so user, doesn't need to re-key-in redundant information, like names, original date & time etc, and just make modification on the description of the last record.....
i have to make this form in my asp.net project [URL] so a tipical master/detail relation in the top of the form there a datepicker wich correspond to master table+ other controls like the customer the grid corespond to the details table (order details table) i want to add records to the details table in the client side and then send all the records in one operation to the server - the problem is how to get the correct primary key from the master table ? - how to insert details record in the client using a gridview control
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 .
Into below code which is working fine, but the last section which started from using (SqlCommand SendMailcmd ... update it as i want when the user click on the button the code take the AdsID and (QAdsEmail "the user email") and send an e-mail to user depending on QAdsEmail and inside the email create a link to URL... so the user when he receive the mail he can click on it and move to the page to edit his Ad info ...
The table where below info will store in is called "ads" and the column that's need for sending email with ad info/the E-mail part of the code below i just copy it from another part of my application ...
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?
Conseptually what I'm doing is simple, and technically it may even be simple, but I'm still rusty. Here's what I'm trying to do:
I have a webform that allows the user to enter a new record, and in there I have also included a couple FileUpload controls. Upon clicking the "Save" button, I'm saving the details entered into one table (ITEMS), and also inserting the FileUpload details (path, id, upload_user) into another table ATTACHMNTS). Because one ITEM can have many attachments, I needed to split the tables up. So on save, I need to save the ITEM, save the ATTACHMENT, and then also put the ITEM_ID in the ATTACHMENT table. I'm second guessing myself because I think all I'd have to do is after I do the ITEM insert, do a SELECT MAX on the ITEM table and hold the newest (MAX) id in a variable and then use it in the ATTACHMENTS update. I'm not 100% on this because there IS a chance that someone else could save a few milliseconds later and I'll link the wrong ITEM. See my delima?
I have a sqlDataSource to populate a grdiview ( simple ) . When I set the sql control to a stored proc that has 4 parameters and person a select * from table ignoring the paramaters it doesn't work. No rweturned results.
I have a pre-existing app that allows me to display detailed record results from a database,and I've made a custom mod to it to limit the type of results(i.e. show me just THESE three tables instead of all tables associated with a record).I would like to make a hyperlink from the abridged version of the record to the full version of the record,but I can't for the life of me figure out how to do this!I know that the code in the .aspx file should look something akin to:
I have a datalist which when a record is clicked you get taken to a details page .../details.aspx?ID=12And that record is displayed in a details view. All this works fine. My question is how can I add the next and previous buttons on the detailsview so they work? If the details view is on the same page as the datalist works no porblem but on a seperate page I get no next and previous records
I'm very new to this area and am using ASP.NET 3.5 with WMD 2008 Express Edition and VB code.
How do I write records to the SQL database using VB? I want to use the connection string, etc used in the ASP.NET controls if possible.
My website is a Rugby Club site and I've an SQL database of match fixtures which include TeamId(1XV, 2XV, etc.), Season(2008, 2009, etc) and match date.
I allow some users to update the fixture details but want to insert a series of new fixture records for the neext season which contain just TeamId Season and Match Dates. I therefore want to take the season and Team Id from label fields and then create match dates by adding seven days to a start date.
I use the following code to insert recode to a sql 2008 table, the field ID of DBProgram is IDENTITY, so SQL 2008 SERVER will pass a value to it automatically. How can I get the ID value of the record I just insert ?
DBProgram dbProgram = new DBProgram(); db.DBPrograms.InsertOnSubmit(dbProgram); db.SubmitChanges();
I converted code from VB that works to c# to insert a record in an SQL daTA BASE.
The VB code is as follows:
Insert a new record into Contact Dim connectionString As String = ConfigurationManager.ConnectionStrings("aspnetdbConnectionString").ConnectionString Dim insertSql As String = "INSERT INTO Contact(UserId, Notes) VALUES(@UserId, @Notes)" Using myConnection As New SqlConnection(connectionString)
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 am going to insert Multiple record IN sql using storedProcedure from gridview...
for this purpose i am using cell concatinating method and send whole gridview cell data in string variable.
i have tried xml document method or sending data in table through looping as well but didn't satisfy from both of them... b/c concatinating method required a delimeter for seperation(for which i have restrict the user from that sepereator ) and xml method required an extra file which is not a efficient approach .
I have an orders table with a column names orderID. What I want to do is insert a new record and get the value from the new orderID column. The orderID is my Primary key. The Insert SQL I have now is -
INSERT INTO orders (creditAutorizarionNumber, OrderName, OrderPersonPhone, OrderPersonEmail) VALUES (@creditAutorizarionNumber,@OrderName,@OrderPersonPhone,@OrderPersonEmail)
How do I write the query to get the newly entered orderID ?
i Am using Special character while insert in the database. When i user single Quotes('), it shows an error that "Unclosed quotation mark after the character string" How can i over come this issue. But i want to insert the special characters"