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
mohammed shamsheer
NA
394
143.9k
status updation in delete button
Feb 20 2012 5:41 AM
using System;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
using System.Web;
public partial class Venderview : System.Web.UI.Page
{
string strConn = ConfigurationManager.ConnectionStrings["connect"].ConnectionString;
DataSet objUserDs = new DataSet();
SqlDataAdapter objUserDa;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SqlConnection con = new SqlConnection(strConn);
con.Open();
SqlCommand objUserCmd = new SqlCommand("select * from Asset_Vendor", con);
objUserDa = new SqlDataAdapter(objUserCmd);
objUserDa.Fill(objUserDs);
grdVendoradd.DataSource=objUserDs;
DataBind();
}
}
protected void btnAdd_Click(object sender, EventArgs e)
{
Response.Redirect("VendorAdd.aspx");
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
String str = Request.Form["rdoUser"];
Response.Redirect("Vendor_Update.aspx?Vendor_Id=" + str);
}
protected void btnDelete_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(strConn);
con.Open();
String str = Request.Form["rdoUser"];
SqlCommand objUserCmd = new SqlCommand("delete from Asset_Vendor where Vendor_Id=@vid", con);
SqlParameter paramUid = new SqlParameter("@vid", SqlDbType.VarChar, 50);
paramUid.Value = str;
objUserCmd.Parameters.Add(paramUid);
objUserCmd.ExecuteNonQuery();
Response.Redirect("Vender_view.aspx");
}
}
instead of delete function i want to add the status of vendor details active or inactive?
Reply
Answers (
1
)
How i can implement SEO(search engine optimization) in my website
requestLengthDiskThreshold