TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ashish sharma
NA
30
857
An exception of type 'System.ArgumentException' occurred in System.Dat
Dec 14 2020 9:58 AM
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Data;
using
System.Data.SqlClient;
public
partial
class
AddStudentRecord : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
protected
void
Submit_Click(
object
sender, EventArgs e)
{
// string name = Name.Text;
}
protected
void
submit_Click(
object
sender, EventArgs e)
{
string
con =
" DataSource=BIJENDER-PC\\SQLSERVER;Initial Catalog = Batch_17028"
;
SqlConnection db =
new
SqlConnection(con);
db.Open();
//tring insert = "insert into tbl_user (u_fname,u_lname,u_contact,u_email) values ('"+txtFname.Text+"','"+txtLname.Text+"','"+txtContact.Text+"','"+txtEmail.Text+"')";
string
insert =
"insert into Student_Bio_Data (STD_Name) values ('"
+ name.Text +
"')"
;
SqlCommand cmd =
new
SqlCommand(insert,db);
int
m = cmd.ExecuteNonQuery();
if
(m != 0)
{
//Response.Write("
//<script>alert('Data Inserted !!')</script>
//");
}
else
{
//Response.Write("
//<script>alert('Data Inserted !!')</script>
//");
}
db.Close();
}
}
Reply
Answers (
3
)
How to remove miscellaneous files in visual studio2019.
Skype control using c#