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
Rajkumar R
NA
183
220.6k
How to convert code from C#(2005) to VB.NET(2000)
Dec 7 2011 5:06 AM
how to convert c# code version 2.0(2005) to vb.net 1.0(2000)
i have tried the following sites to convert but that r convert from 2005 to 2005
<a href="http://www.developerfusion.com"></a>
<a href="http://www.tangiblesoftwaresolutions.com"></a>
post solution for this
or otherwise say solution for this in VS 2000 gridview is not available, so i used datagrid control in that. In that datagrid control Rows property is not available.
protected void btnadddata_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=TNVKP_8;Integrated Security=True");
for (int i = 0; i < GridView2.Rows.Count; i++)
{
//GridViewRow row = GridView1.Rows[i];
//CheckBox chkbox = (CheckBox)row.FindControl("chkbox1");
CheckBox chkbox = (CheckBox)GridView2.Rows[i].FindControl("chkbox1");
Label label1 = (Label)GridView2.Rows[i].FindControl("Label1");
Label label2 = (Label)GridView2.Rows[i].FindControl("Label2");
Label label3 = (Label)GridView2.Rows[i].FindControl("Label3");
Label label4 = (Label)GridView2.Rows[i].FindControl("Label4");
Label label5 = (Label)GridView2.Rows[i].FindControl("Label5");
Label label6 = (Label)GridView2.Rows[i].FindControl("Label6");
Label label7 = (Label)GridView2.Rows[i].FindControl("Label7");
Label label8 = (Label)GridView2.Rows[i].FindControl("Label8");
Label label9 = (Label)GridView2.Rows[i].FindControl("Label9");
Label label10 = (Label)GridView2.Rows[i].FindControl("Label10");
if (chkbox.Checked == true) //&& (row.Cells[11].Text=="Ok")
{
con.Open();
string str;
str = "insert into employee (empid,empname,empaddress,empcity,empstate,empzip,emplic,empstatus,empp,empi) values('" + label1.Text + "','" + label2.Text + "','" + label3.Text + "','" + label4.Text + "','" + label5.Text + "','" + label6.Text + "','" + label7.Text + "','" + label8.Text + "','" + label9.Text + "','" + label10.Text + "')";
SqlCommand com = new SqlCommand(str, con);
com.ExecuteNonQuery();
con.Close();
}
Label1.Text = "Records inserted";
}
}
Reply
Answers (
1
)
Use of application state management
Fill grid view from both XML data and grid data