Windows form close and open next form in Windows Application in C#.NET
Form2 Form2 = new Form2(); Form2.StartPosition = FormStartPosition.CenterParent; this.Hide(); Form2.ShowDialog(); this.Close(); ...
Find if a value exists in an Array in VB6.0
Module: Option Explicit Public Function IsInArray(FindValue As Variant, arrSearch As Variant) As Boolean On Error GoTo LocalError If Not IsArray(arrSearch) Then Exit...
VB code to show all table names of a databse
Dim rs As ADODB.Recordset Dim con As New ADODB.Connection Dim tables() As String Dim table1, tablename As String Dim i As Integer...
VB code to create kml file and open google earth with sms application
Dim message, mess As String Dim sms() As String Dim sm() As String Dim lat, lon, d1, d2 As String Dim lat1, lon1...
Crystal Reports with Selection formula
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace WEIGHBRIDGE1 { public partial class...
Encryption and Decription
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml;using System.Text; using...
BulletedList Example in Web Application
output:- C# Source Code: protected void Page_Load(object sender, EventArgs e) { if(! Page.IsPostBack) Label1.Text = "Page is loaded first time."; else Label1.Text =...
Adding Items in ListBox
output: C# Source Code: int HiddenValue; protected void Button1_Click(object sender, EventArgs e) { HiddenValue = Convert.ToInt32(HiddenField1.Value.ToString()); ListBox1.Items.Add("Item " + HiddenValue.ToString()); Label4.Text = HiddenValue.ToString();...
TextBox Example in Web Application
output: C# Code: protected void Button1_Click(object sender, EventArgs e) { TextBox1.Text = "You have clicked the button"; TextBox4.Text = "This is a...
MessageBox in Web Application
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Windows.Forms;...
Data on datagrid from excel sheet
Source Code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.OleDb; namespace excel { public partial...
VB Tutorials
Database connection with MSAcess Database and insert,update,delete,select commands in VB Output is: Source Code is: Dim con As New ADODB.Connection Dim rs As...
TextBox Control
protected void Button1_Click(object sender, EventArgs e) { TextBox1.Text = "You have clicked the button"; TextBox4.Text = "This is a multi line textbox....
Literal Control
protected void Button1_Click(object sender, EventArgs e) { Literal1.Text = "Welcome to ASP.NET 2.0"; } ...
HiddenField Control
Html Code is: asp:HiddenField ID="HiddenField1" runat="Server" Value="Welcome to ASP.NET 2.0" Visible="False" Source Code is: protected void Button1_Click(object sender, EventArgs e) { Label1.Text...
File Upload Control
Source Code: protected void Button1_Click(object sender, EventArgs e) { if( FileUpload1.HasFile) { FileUpload1.SaveAs("C:/projects/" + FileUpload1.FileName); Label2.Text = "File Uploaded"; } else Label2.Text...