15,884,298 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by rockpune (Top 156 by date)
rockpune
27-Aug-12 11:06am
View
not working
rockpune
26-Jul-12 8:39am
View
i have to update datagridview selected row value
rockpune
26-Jul-12 5:20am
View
yes i keep primary key for that table the wat can i do plz give me one example
rockpune
26-Jul-12 5:12am
View
i have one form in that two textboxs and one save button
in form2 datagridview and two buttons one is save another update i have to update datagridview selected row value how can i do that?
rockpune
26-Jul-12 5:10am
View
Deleted
sorry sir
rockpune
17-Jul-12 10:26am
View
both delete from database and listbox
rockpune
17-Jul-12 9:22am
View
ok thanx for your replay
rockpune
17-Jul-12 9:19am
View
in messagebox it shows system.data.datarow
rockpune
17-Jul-12 9:12am
View
in messagebox it showing (System.Windows.Forms.ListBox Items.Count:21,Items[0]:Div3) like this
rockpune
17-Jul-12 9:07am
View
Server not found your link
rockpune
17-Jul-12 9:04am
View
windowsform C#
rockpune
17-Jul-12 9:03am
View
ya i tryed still not getting
rockpune
17-Jul-12 8:57am
View
no error but no deleting any item
rockpune
17-Jul-12 4:02am
View
when i click on listbox item i have to display that item into anotherform textbox for update
rockpune
16-Jul-12 3:11am
View
i have two form in first form have textboxs and one save button
and in second form datagridview when i select on particular row on button click i have to show that row values into next form of textboxes for update
rockpune
14-Jul-12 4:48am
View
thnx sir
rockpune
13-Jul-12 6:57am
View
so wat can i do now
rockpune
13-Jul-12 6:49am
View
i have only one button to save in form2 either i insert data or update data
rockpune
13-Jul-12 6:47am
View
updating the table
rockpune
13-Jul-12 6:47am
View
updating hte table
rockpune
13-Jul-12 6:34am
View
i have 2 forms in form1 i have datagridview and second form some textboxs controls have but my proble is when i click on gridview row i want to display that row values into form2 for update bu here it showing
Abort due to constraint violation PRIMARY KEY must be unique
rockpune
7-Jul-12 2:06am
View
still it is getting error sir
rockpune
7-Jul-12 2:04am
View
ok i will try
rockpune
2-Jul-12 4:06am
View
sir give me one example by using two radiobuttons
rockpune
26-Jun-12 2:45am
View
thnx
rockpune
26-Jun-12 1:37am
View
give me any help
rockpune
26-Jun-12 1:36am
View
yesterday unfortunately i updated one dataase table field how can i get the old data back on that field
am using sql-2008
rockpune
22-Jun-12 8:36am
View
same error not getting any output
rockpune
22-Jun-12 8:02am
View
Error converting data type nvarchar to int.
rockpune
22-Jun-12 6:39am
View
still not getting dropdownlist value into listbox
rockpune
20-Jun-12 9:35am
View
still not getting any result
rockpune
20-Jun-12 9:24am
View
sir
i try like this but not getting
<asp:Button ID="btnSaveBatting" runat="server" Text="Save" onclick="btnSaveBatting_Click" OnClientClick ="Check()"/>
rockpune
20-Jun-12 9:23am
View
i try like this but not getting
<asp:Button ID="btnSaveBatting" runat="server" Text="Save"
onclick="btnSaveBatting_Click" OnClientClick ="Check()"/>
rockpune
20-Jun-12 9:13am
View
am using asp.net sir
rockpune
20-Jun-12 9:12am
View
asp.net
rockpune
20-Jun-12 9:12am
View
yes
rockpune
14-Jun-12 9:40am
View
i want to show submenus in the above code the above code is totally belongs to Main menu by using this i want to create submenu items
rockpune
21-May-12 8:47am
View
iphone backup application
rockpune
30-Mar-12 2:57am
View
can u give me code using C#
rockpune
29-Mar-12 8:37am
View
filename= .xls what file name i have to give there
rockpune
29-Mar-12 8:37am
View
yes filename= .xls what file name i have to give there
rockpune
22-Mar-12 8:05am
View
thank u brother
rockpune
22-Mar-12 8:03am
View
where it is?
rockpune
22-Mar-12 3:20am
View
i create register form in login form when i click on linkbutton signup button it was not opening register form how can i do that
rockpune
22-Mar-12 3:16am
View
i create register form in login form when i click on linkbutton signup button it was not opening register form how can i do that
rockpune
22-Mar-12 3:16am
View
i create register form in login form when i click on linkbutton signup button it was not opening register form how can i do that
rockpune
19-Mar-12 10:18am
View
in valid username
rockpune
19-Mar-12 5:54am
View
getting this A column named 'Name' already belongs to this DataTable.
rockpune
19-Mar-12 5:48am
View
i write like this
dt = (DataTable)Session["CurrentData"];
dr = dt.NewRow();
this is correct?
rockpune
19-Mar-12 5:43am
View
at which place i add this .......dt = Session["CurrentData"];
rockpune
16-Mar-12 6:23am
View
still not getting
rockpune
16-Mar-12 3:34am
View
i tryed still not getting sir..........
rockpune
16-Mar-12 1:38am
View
am newly learning plz tell me how can i do that
rockpune
14-Mar-12 9:45am
View
nothing but exceptions
rockpune
14-Mar-12 9:26am
View
in that meassagebox getting code
rockpune
14-Mar-12 9:24am
View
when i run iam getting one message box..
am trying to insert parentnode and child node into database
rockpune
14-Mar-12 7:17am
View
am newly learning plz tell me how cani do that
rockpune
9-Mar-12 6:16am
View
thanx
rockpune
9-Mar-12 6:00am
View
Deleted
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 24: {
Line 25:
Line 26: sc = new SqlConnection(ConfigurationManager.ConnectionStrings["CompMSConnectionString1"].ConnectionString);
Line 27: sc = new SqlConnection(@"Data Source=CIODEV03\\SQLEXPRESS;Initial Catalog=EmployeeDB;Integrated Security=True");
Line 28: sc.Open();
rockpune
9-Mar-12 6:00am
View
Deleted
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 24: {
Line 25:
Line 26: sc = new SqlConnection(ConfigurationManager.ConnectionStrings["CompMSConnectionString1"].ConnectionString);
Line 27: sc = new SqlConnection(@"Data Source=CIODEV03\\SQLEXPRESS;Initial Catalog=EmployeeDB;Integrated Security=True");
Line 28: sc.Open();
rockpune
9-Mar-12 6:00am
View
Deleted
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 24: {
Line 25:
Line 26: sc = new SqlConnection(ConfigurationManager.ConnectionStrings["CompMSConnectionString1"].ConnectionString);
Line 27: sc = new SqlConnection(@"Data Source=CIODEV03\\SQLEXPRESS;Initial Catalog=EmployeeDB;Integrated Security=True");
Line 28: sc.Open();
rockpune
9-Mar-12 6:00am
View
Deleted
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 24: {
Line 25:
Line 26: sc = new SqlConnection(ConfigurationManager.ConnectionStrings["CompMSConnectionString1"].ConnectionString);
Line 27: sc = new SqlConnection(@"Data Source=CIODEV03\\SQLEXPRESS;Initial Catalog=EmployeeDB;Integrated Security=True");
Line 28: sc.Open();
rockpune
9-Mar-12 2:18am
View
any one tell me
rockpune
8-Mar-12 2:24am
View
thanx alot my dear friend
rockpune
7-Mar-12 9:21am
View
i have to enter these values in textboxes plz tell me how can i do this
rockpune
7-Mar-12 9:18am
View
am entering this values in textbox in C# windows form how can i write
rockpune
7-Mar-12 9:17am
View
in want to write only this part pf = 0.08 * basic;
if (basic < 5000)
{
da = 0.3 * basic;
hra = 0.08 * basic;
}
else if ((basic >= 5000) && (basic < 10000))
{
da = 0.4 * basic;
hra = 0.1 * basic;
}
else
{
da = 0.5 * basic;
hra = 0.2 * basic;
}
gross = basic + da + hra;
net = gross - tax + pf;
rockpune
7-Mar-12 9:15am
View
i want in windows form
rockpune
7-Mar-12 7:24am
View
getting error
rockpune
7-Mar-12 7:09am
View
where i have to write this e.Keychar == (char)13
rockpune
7-Mar-12 6:40am
View
thank u sir but i get that now i want to do total gross salary how can i do tell me
rockpune
7-Mar-12 6:30am
View
where i have to write this code on button?
rockpune
7-Mar-12 6:29am
View
not getting sir coming error
rockpune
25-Feb-12 2:47am
View
Illegal characters in path.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Illegal characters in path.
Source Error:
Line 17: XmlTextReader reader = new XmlTextReader("C:\\Documents and Settings\azhar\\Desktop\appsettings.xml");
Line 18: XmlNodeType type;
Line 19: while (reader.Read())
Line 20:
Line 21: {
rockpune
25-Feb-12 2:46am
View
sorry sir but am unable to find that error tell me sir
rockpune
25-Feb-12 2:30am
View
ok
rockpune
25-Feb-12 1:29am
View
gettin error
rockpune
25-Feb-12 1:28am
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
XmlDocument xDoc = new XmlDocument();
xDoc.Load(@"<c:\\documents and="" settings\azhar\desktop\\appsettings.xml="" here="">");
}
}
rockpune
25-Feb-12 1:22am
View
plz tell me steps one by one am learnig newly plz sir its urgent
rockpune
25-Feb-12 1:12am
View
yes sir
rockpune
24-Feb-12 7:42am
View
am not getting output as xml file how can i see that file as xml
rockpune
24-Feb-12 6:45am
View
yes urgent
rockpune
24-Feb-12 1:49am
View
this is urgent plz sir send the code
rockpune
24-Feb-12 1:48am
View
<PLAYER_SETTINGS Name="SiteURL" Value="http://irrex.ctco.lv:81/videocapture/"/>
this is my url i have read this in xml and also i have to show this file in next page by using application varible plz urgent tell me
rockpune
23-Feb-12 2:36am
View
means
rockpune
22-Feb-12 3:09am
View
thank u sir
rockpune
22-Feb-12 3:03am
View
private void Addnew()
{
//For getting the LocationID
string test = string.Empty;
DataSet d = PDataset("SELECT TOP (1) ObjID, ObjName, ObjParentID FROM tblObjectives order by ObjID Desc");
string a = "";
try
{
rockpune
22-Feb-12 2:58am
View
when i add new item i want to get ID number automatically for each add new item....nothing but token number
rockpune
22-Feb-12 2:49am
View
4.use custom ID :
U can have ur format of ID like M001, PR003, MAB1 etc
So for this kind of id u can do following
i. get max value from ID column using max()
ii. separate number and char
iii. do increment in number
iv. join number and character
v. use new value in textbox
i want like above plz give me above example code
rockpune
21-Feb-12 0:55am
View
in the place of demoapplicationname what i have to write
rockpune
21-Feb-12 0:42am
View
thanx brother
rockpune
20-Feb-12 1:52am
View
i get it
rockpune
20-Feb-12 1:52am
View
ok
rockpune
20-Feb-12 1:42am
View
salamwalekum rahman bhai thanx...............
azhar
rockpune
20-Feb-12 1:35am
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ASPxButton1_Click(object sender, EventArgs e)
{
Response.Cookies.Add(new HttpCookie("MyCookie", ASPxTextBox2.Text));
}
protected void ASPxButton2_Click(object sender, EventArgs e)
{
Session["Mysession"] = ASPxTextBox3.Text;
}
protected void ASPxButton3_Click(object sender, EventArgs e)
{
ViewState.Add("MyViewState",ASPxTextBox4.Text);
}
protected void ASPxButton4_Click(object sender, EventArgs e)
{
ASPxLabel1.Text = Server.HtmlEncode(Request.Cookies["Mycookie"].Value);
ASPxLabel2.Text = Session["Mysession"].ToString();
ASPxLabel3.Text = ViewState["MyViewState"].ToString();
}
}
rockpune
20-Feb-12 0:57am
View
i have to learn how to write above code in 2 or 3 lines plzzz tell me sir
rockpune
20-Feb-12 0:56am
View
i have to learn how to write above code in 2 or 3 lines plzzz tell me sir
rockpune
17-Feb-12 6:17am
View
columname=loclogo,datatype=image,allownull=not
rockpune
17-Feb-12 6:13am
View
tbllocationdetails=table name
rockpune
17-Feb-12 6:09am
View
yes for saving but i have to view from DB
rockpune
17-Feb-12 6:05am
View
select * from tbllocationdetails
rockpune
17-Feb-12 6:05am
View
mylocation=tablename
rockpune
17-Feb-12 6:04am
View
mylocation=table name,
DB=IMADB
image storing.... columname=loclogo,datatype=image,allownull=not
rockpune
17-Feb-12 5:57am
View
sorry not null
rockpune
17-Feb-12 5:55am
View
null
rockpune
17-Feb-12 5:55am
View
i have to view iamge from DB
rockpune
17-Feb-12 5:54am
View
table name sir
rockpune
17-Feb-12 5:52am
View
sql table... for image storing.... columname=loclogo,datatype=image,allownull=not
rockpune
17-Feb-12 5:49am
View
i want to view image from DB acctully am viewing from folder inserted images
rockpune
17-Feb-12 5:45am
View
not null sir.....loclogo(image,not null)
rockpune
17-Feb-12 5:40am
View
plz tell me what can i do am newly learnig .net plz help me
rockpune
17-Feb-12 5:26am
View
Server Error in '/' Application.
Path cannot be null.
Parameter name: path
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Path cannot be null.
Parameter name: path
Source Error:
Line 276: {
Line 277: FileStream fs;
Line 278: fs = new FileStream(fileadd, FileMode.Open, FileAccess.Read);
Line 279: byte[] picbyte = new byte[fs.Length];
Line 280: fs.Read(picbyte, 0, System.Convert.ToInt32(fs.Length));
rockpune
17-Feb-12 1:19am
View
am newly learnig .net sir plz tell me how to add pre tag
rockpune
16-Feb-12 8:20am
View
when am uploding the img it can storing into DB but viewing from folder but i have to view from DB only
rockpune
16-Feb-12 8:20am
View
when am uploding the img it can storing into DB but viewing from folder but i have to view from DB only
rockpune
16-Feb-12 8:20am
View
when am uploding the img it can storing into DB but viewing from folder but i have to view from DB only
rockpune
14-Feb-12 6:28am
View
than u very much brother
rockpune
14-Feb-12 6:02am
View
thank u sir
rockpune
14-Feb-12 2:12am
View
thank u sir
rockpune
14-Feb-12 1:58am
View
what is its uses
rockpune
13-Feb-12 2:49am
View
i will try sir but getting this type of error
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source Error:
Line 26: protected void ASPxButton2_Click(object sender, EventArgs e)
Line 27: {
Line 28: ASPxListBox1.Items.Remove(new ListEditItem(ASPxTextBox1.Text));
Line 29: //ASPxTextBox1.Text = "";
Line 30: }
rockpune
13-Feb-12 2:39am
View
sorry sir am newly learning .net where and how to add pre tag pleas tell me.........
rockpune
13-Feb-12 1:20am
View
i tryed but not getting output sir
rockpune
13-Feb-12 1:17am
View
ok sir
rockpune
11-Feb-12 4:53am
View
devexcontrols thirdparty controls
rockpune
10-Feb-12 3:51am
View
thank u sir
rockpune
10-Feb-12 2:18am
View
thank u
rockpune
10-Feb-12 2:17am
View
Server Error in '/Bind dropdwnlist in gridview' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'ASP.default2_aspx' does not contain a definition for 'gv_SelectedIndexChanged' and no extension method 'gv_SelectedIndexChanged' accepting a first argument of type 'ASP.default2_aspx' could be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 11: <div>
Line 12:
Line 13: <asp:GridView runat="server" ID="gv" AutoGenerateColumns="False"
Line 14: onrowdatabound="gv_RowDataBound" CellPadding="4" ForeColor="#333333"
Line 15: GridLines="None" onselectedindexchanged="gv_SelectedIndexChanged" Width="188px">
rockpune
10-Feb-12 2:13am
View
now wat i have to do
rockpune
9-Feb-12 6:13am
View
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using DevExpress.XtraEditors;
namespace browserlist
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
foreach (DriveInfo d1 in DriveInfo.GetDrives())
drivelist.Items.Add(d1);
}
private void drivelist_SelectedIndexChanged(object sender, EventArgs e)
{
folderlist.Items.Clear();
try
{
DriveInfo drive = (DriveInfo)drivelist.SelectedItem;
foreach (DirectoryInfo driveinfo in drive.RootDirectory.GetDirectories())
folderlist.Items.Add(driveinfo);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void folderlist_SelectedIndexChanged(object sender, EventArgs e)
{
fileslist.Items.Clear();
DirectoryInfo dir = (DirectoryInfo)folderlist.SelectedItems;
foreach (FileInfo f1 in dir.GetFiles())
fileslist.Items.Add(f1);
}
}
}
rockpune
9-Feb-12 5:45am
View
u can take lable in asp.net there is no any options to get the messagebox
rockpune
9-Feb-12 5:41am
View
send me ur code
rockpune
8-Feb-12 6:03am
View
thank u
rockpune
8-Feb-12 6:00am
View
thanks
rockpune
8-Feb-12 5:57am
View
thanks
rockpune
8-Feb-12 5:57am
View
thanks
rockpune
8-Feb-12 4:44am
View
thank u brother
rockpune
8-Feb-12 2:09am
View
Incorrect syntax near the keyword 'values'.
Server Error in '/Checkavailabulity' Application.
Incorrect syntax near the keyword 'values'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'values'.
Source Error:
Line 30:
Line 31: cmd = new SqlCommand("insert into values('"+TextBox1.Text+"','"+TextBox3.Text+"'", con);
Line 32: cmd.ExecuteNonQuery();
Line 33: }
Line 34:
rockpune
8-Feb-12 1:48am
View
cmd.ExecuteNonQuery();
rockpune
8-Feb-12 1:48am
View
cmd.ExecuteNonQuery();
rockpune
8-Feb-12 1:44am
View
exception
rockpune
8-Feb-12 1:44am
View
exception
rockpune
8-Feb-12 1:44am
View
exception
rockpune
8-Feb-12 1:44am
View
exception
rockpune
6-Feb-12 1:19am
View
private void Form1_Load(object sender, EventArgs e)
{
try
{
sqlCon.Open();
loaddata();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void loaddata()
{
try
{
sqlAdapter = new SqlDataAdapter("SELECT *, 'Delete' AS [Delete] FROM Employees", sqlCon);
sqlCommand = new SqlCommandBuilder(sqlAdapter);
sqlAdapter.InsertCommand = sqlCommand.GetInsertCommand();
sqlAdapter.UpdateCommand = sqlCommand.GetUpdateCommand();
sqlAdapter.DeleteCommand = sqlCommand.GetDeleteCommand();
dataset = new DataSet();
sqlAdapter.Fill(dataset, "Employees");
dataGridView1.DataSource = null;
dataGridView1.DataSource = dataset.Tables["Employees"];
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
DataGridViewLinkCell linkCell = new DataGridViewLinkCell();
dataGridView1[6, i] = linkCell;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
try
{
int lastRow = dataGridView1.Rows.Count - 2;
DataGridViewRow nRow = dataGridView1.Rows[lastRow];
DataGridViewLinkCell linkCell = new DataGridViewLinkCell();
dataGridView1[6, lastRow] = linkCell;
nRow.Cells["Delete"].Value = "Insert";
}
catch (Exception ex) { MessageBox.Show(ex.Message); }
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
//try
//{
if (e.ColumnIndex == 6)
{
string Task = dataGridView1.Rows[e.RowIndex].Cells[6].Value.ToString();
if (Task == "Delete")
{
if (MessageBox.Show("Are you sure to delete?", "Deleting...", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
int rowIndex = e.RowIndex;
dataGridView1.Rows.RemoveAt(rowIndex);
dataset.Tables["Employees"].Rows[rowIndex].Delete();
sqlAdapter.Update(dataset, "Employees");
}
}
else if (Task == "Insert")
{
int row = dataGridView1.Rows.Count - 2;
DataRow dr = dataset.Tables["Employees"].NewRow();
dr["LastName"] = dataGridView1.Rows[row].Cells["LastName"].Value;
dr["FirstName"] = dataGridView1.Rows[row].Cells["FirstName"].Value;
dr["Title"] = dataGridView1.Rows[row].Cells["Title"].Value;
dr["HireDate"] = dataGridView1.Rows[row].Cells["HireDate"].Value;
dr["PostalCode"] = dataGridView1.Rows[row].Cells["PostalCode"].Value;
dataset.Tables["Employees"].Rows.Add(dr);
dataset.Tables["Employees"].Rows.RemoveAt(dataset.Tables["Employees"].Rows.Count - 1);
dataGridView1.Rows.RemoveAt(dataGridView1.Rows.Count - 2);
dataGridView1.Rows[e.RowIndex].Cells[6].Value = "Delete";
sqlAdapter.Update(dataset, "Employees");
}
else if (Task == "Update")
{
int r = e.RowIndex;
dataset.Tables["Employees"].Rows[r]["LastName
rockpune
3-Feb-12 6:33am
View
Cannot insert the value NULL into column 'pid', table 'images.dbo.gallery'; column does not allow nulls. INSERT fails.
The statement has been terminated.
Line 35: }
Line 36:
Line 37: SqlDataSource1.Insert();
Line 38:
Line 39: }
rockpune
3-Feb-12 6:31am
View
Line 31: savepath = Path.Combine(Request.PhysicalApplicationPath, imagefoldr);
Line 32: savefile = Path.Combine(savefile, FileUpload1.FileName);
Line 33: FileUpload1.SaveAs(savefile);
Line 34: SqlDataSource1.Insert();
Line 35:
rockpune
3-Feb-12 6:29am
View
this exception come
The SaveAs method is configured to require a rooted path, and the path 'Winter.jpg' is not rooted.
rockpune
3-Feb-12 6:25am
View
than u brother
rockpune
3-Feb-12 6:23am
View
Error 1 Use of unassigned local variable 'savefile' C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\WebSites\user\Default2.aspx.cs 31 33 C:\...\user\
rockpune
3-Feb-12 6:21am
View
Error 1 Use of unassigned local variable 'savefile' C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\WebSites\user\Default2.aspx.cs 31 33 C:\...\user\
rockpune
3-Feb-12 6:21am
View
Error 1 Use of unassigned local variable 'savefile' C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\WebSites\user\Default2.aspx.cs 31 33 C:\...\user\
rockpune
25-Jan-12 3:11am
View
no controls
rockpune
25-Jan-12 3:04am
View
no control name
rockpune
23-Jan-12 8:47am
View
plzzzzzzzzz give me answer any one urgent
rockpune
23-Jan-12 8:43am
View
Deleted
ykyu
Show More