Popular posts from this blog
Add new node(Element) in existing xml file in C#.Net
first make form like : - now double click on button and write code like : ///////////////////////// CODE //////////////////////////// using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Xml; using System.Windows.Forms; namespace Xml_File_Operation { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button3_Click(object sender, EventArgs e) { XmlDocument xdoc1 = new XmlDocument(); xdoc1.Load("C:\\Users\\Nirav\\Desktop\\people1.xml"); XmlNode person = xdoc1.CreateElement("person"); XmlNode name = xdoc1.CreateElement("name"); name.InnerText = textBox1.Text; person.AppendChild(name); XmlNode age = xdoc1.Creat...
How to Generate random rows in dataset using c#.net
For generating the random rows from the data set first you have to generate the random numbae and this number is pass to the dataset CODE: SqlConnection con = new SqlConnection("Data Source=NIRAV-PC;Initial Catalog=Student;Integrated Security=True"); con.Open(); string str = "select * from StudentDetail"; SqlCommand cmd =new SqlCommand(str,con); SqlDataAdapter sda = new SqlDataAdapter(cmd); DataSet ds =new DataSet(); sda.Fill(ds); Random RandomNumber = new Random(); ...

Comments
Post a Comment