473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

code for submit button and data should be insert into oracle database.

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections;
  3. using System.Configuration;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Security;
  8. using System.Web.UI;
  9. using System.Web.UI.HtmlControls;
  10. using System.Web.UI.WebControls;
  11. using System.Web.UI.WebControls.WebParts;
  12. using System.Xml.Linq;
  13.  
  14. namespace CourierMgmt
  15. {
  16.     public partial class WebForm6 : System.Web.UI.Page
  17.     {
  18.         protected void Page_Load(object sender, EventArgs e)
  19.         {
  20.  
  21.         }
  22.  
  23.         protected void Button1_Click(object sender, EventArgs e)
  24.         {
  25.             string consignmentno = TextBox1.Text;
  26.             string f_add = TextBox9.Text;
  27.             string t_add = TextBox8.Text;
  28.             string f_ph = TextBox5.Text;
  29.             string f_pin =TextBox10.Text;
  30.             string t_ph = TextBox3.Text;
  31.             string t_pin =TextBox2.Text;
  32.             string status = TextBox6.Text;
  33.             string Present = TextBox7.Text;
  34.  
  35.             string get = "insert into aba(consignmentno, f_add, t_add, f_ph , f_pin, t_ph, t_pin, status, Present) values(" + consignmentno + ",'" + f_add + "','" + t_add + "'," + f_ph + ", " + f_pin + "," + t_ph + "," + t_pin + ",'" + status + "','" + Present + "')";
  36.            DataManager.ExecuteNonQuery(get);
  37.  
  38.         }
  39.  
  40.         protected void Button4_Click(object sender, EventArgs e)
  41.         {
  42.             Response.Redirect("WebForm6.aspx");
  43.         }
  44.     }
  45. }
so I am using this code but it didnot showing any error and data didnot inserting the table please send me a code .
Sep 11 '08 #1
1 1789
DrBunchman
979 Expert 512MB
Hi kumar85,

Welcome to Bytes.com! I hope you find the site useful.

You've posted your question in the ASP Forum which is for Classic ASP only - I've moved it for you but in future please post all ASP.NET questions in the .NET Forum.

Please don't forget to wrap your code in CODE tags - it makes your posts much easier to read - and please read the Posting Guidelines if you have not done so already.

With regards to your problem, is your sub wired up to handle the button click event? If you put a breakpoint on the sub and click the button does it hit it?

Dr B
Sep 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jan van Veldhuizen | last post by:
I try to use the Server Data on Insert property to return a column value swhich is set in a trigger. But it does not work. Why not? What am I doing wrong? (BTW I'm using Oracle version 10) My...
1
by: SABmore | last post by:
I have the following code that populates 3 independent drop-down boxes with data from arrays. From there the user can select a value from a drop-down list, or input data into a text box. The user...
4
by: louise raisbeck | last post by:
I have this scenario (simplified) function addnewdata () { check for partial match already in db for information entered by user if (partialmatch succeeds) { open new window aspx page (using...
7
by: | last post by:
I am having trouble figuring out to call a database INSERT procedure from a simple submit form. It appears I should use the onclick event to trigger the procedure called BUT when I do this I...
4
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I...
10
by: Ben | last post by:
Hi, I made an application in classic asp (reservation of books and video stuffs for students) and want to migrate to asp.net. The user has to chose a date, then pushung on a submit button. The...
3
by: Ian Davies | last post by:
I have the folowing script which has two forms. the first adds a record to a database the second uploads a file. The problem is each form has its own button to perform the action. What I wish to do...
7
by: robin1983 | last post by:
Hi, good morning everyone, i have a file called attendence.php The problem is that some part of code is executing properly and half of the code is not and i dont get any warning or error message. For...
0
by: akshalika | last post by:
I am new to Biztalk. In my project we need to connect oracle database and insert data into oracle table using BizTalk project. I use WCF Adapter pack(SP2). I create biztalk project then using Consume...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.