Click here to Skip to main content
15,921,905 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: 2 select command in one gridview Pin
Arun Jacob10-Sep-09 0:36
Arun Jacob10-Sep-09 0:36 
GeneralRe: 2 select command in one gridview Pin
Flavia A10-Sep-09 1:23
Flavia A10-Sep-09 1:23 
GeneralRe: 2 select command in one gridview Pin
Arun Jacob10-Sep-09 1:26
Arun Jacob10-Sep-09 1:26 
QuestionSave images in host Pin
fattycode9-Sep-09 23:43
fattycode9-Sep-09 23:43 
AnswerRe: Save images in host Pin
Abhijit Jana9-Sep-09 23:52
professionalAbhijit Jana9-Sep-09 23:52 
GeneralRe: Save images in host Pin
fattycode10-Sep-09 0:01
fattycode10-Sep-09 0:01 
GeneralRe: Save images in host Pin
Abhijit Jana10-Sep-09 0:10
professionalAbhijit Jana10-Sep-09 0:10 
Questionlinking sqldatabase to Csharp Pin
Nancy Sackey9-Sep-09 23:39
Nancy Sackey9-Sep-09 23:39 
hi am quite new to programming and am trying my hands on some codes i copied from the net but am facing these problems
"
Error 1 Program 'C:\Users\Nancy\Documents\Visual Studio 2008\Projects\softwaree\softwaree\obj\Debug\softwaree.exe' has more than one entry point defined: 'softwaree.Program.Main()'. Compile with /main to specify the type that contains the entry point. C:\Users\Nancy\Documents\Visual Studio 2008\Projects\softwaree\softwaree\Program.cs 14 21 softwaree



AND


Error 2 Program 'C:\Users\Nancy\Documents\Visual Studio 2008\Projects\softwaree\softwaree\obj\Debug\softwaree.exe' has more than one entry point defined: 'softwaree.Form2.Main()'. Compile with /main to specify the type that contains the entry point. C:\Users\Nancy\Documents\Visual Studio 2008\Projects\softwaree\softwaree\Form2.cs 53 17 softwaree




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.Data.SqlClient;


namespace softwaree
{
public partial class Form2 : Form
{
SqlConnection cn = new SqlConnection("data source=.;database=biblio;uid=admin;pwd=pw");
SqlDataAdapter da = new SqlDataAdapter();
string strSQL = "Select Title, PubID from Titles";
SqlCommand cmd;
SqlDataReader Dr;

System.Windows.Forms.Button Button2 = new System.Windows.Forms.Button();
System.Windows.Forms.ListBox ListBox2 = new System.Windows.Forms.ListBox();
System.Windows.Forms.TextBox TextBox2 = new System.Windows.Forms.TextBox();

public Form2()
{
cmd = new SqlCommand(strSQL, cn);
this.SuspendLayout();

this.Button2.Location = new System.Drawing.Point(136, 248);
this.Button2.Size = new System.Drawing.Size(144, 32);
this.Button2.Text = "Get Data";
this.Button2.Click += new System.EventHandler(this.Button1_Click);

this.ListBox2.Location = new System.Drawing.Point(48, 64);
this.ListBox2.Size = new System.Drawing.Size(312, 160);

this.TextBox2.Location = new System.Drawing.Point(48, 24);
this.TextBox2.Size = new System.Drawing.Size(328, 20);
this.TextBox2.Text = "Hit";

this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(408, 293);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.Button2,
this.ListBox2,
this.TextBox2});
this.ResumeLayout(false);
}

[STAThread]
static void Main() {
Application.Run(new Form2());
InitializeComponent();
}

private void Form2_Load(object sender, EventArgs e)
{
}

private void button2_Click(object sender, EventArgs e)
{
cn.Open();
cmd.CommandText = strSQL + "'" + TextBox1.Text + "%'";
Dr = cmd.ExecuteReader();
ListBox1.Items.Clear();
ListBox1.BeginUpdate();

while (Dr.Read()){
ListBox1.Items.Add(Dr.GetString(0) + " - " + Dr.GetInt32(1).ToString());
}

ListBox1.EndUpdate();

Dr.Close();

}



}
}



AnswerRe: linking sqldatabase to Csharp Pin
Manas Bhardwaj9-Sep-09 23:45
professionalManas Bhardwaj9-Sep-09 23:45 
AnswerRe: linking sqldatabase to Csharp Pin
Christian Graus10-Sep-09 0:28
protectorChristian Graus10-Sep-09 0:28 
QuestionHow to filter Dataset value colmun wise Pin
Samarjeet Singh@india9-Sep-09 23:20
Samarjeet Singh@india9-Sep-09 23:20 
AnswerRe: How to filter Dataset value colmun wise Pin
Arun Jacob9-Sep-09 23:24
Arun Jacob9-Sep-09 23:24 
GeneralRe: How to filter Dataset value colmun wise Pin
Samarjeet Singh@india10-Sep-09 0:16
Samarjeet Singh@india10-Sep-09 0:16 
AnswerRe: How to filter Dataset value colmun wise Pin
Arun Jacob10-Sep-09 0:24
Arun Jacob10-Sep-09 0:24 
QuestionRe: How to filter Dataset value colmun wise Pin
Samarjeet Singh@india10-Sep-09 0:34
Samarjeet Singh@india10-Sep-09 0:34 
AnswerRe: How to filter Dataset value colmun wise Pin
Arun Jacob10-Sep-09 1:08
Arun Jacob10-Sep-09 1:08 
Questionabout substring Pin
Rajeshwar Code- Developer9-Sep-09 23:03
Rajeshwar Code- Developer9-Sep-09 23:03 
AnswerRe: about substring Pin
Arun Jacob9-Sep-09 23:09
Arun Jacob9-Sep-09 23:09 
GeneralRe: about substring Pin
Rajeshwar Code- Developer9-Sep-09 23:23
Rajeshwar Code- Developer9-Sep-09 23:23 
GeneralRe: about substring Pin
Arun Jacob9-Sep-09 23:24
Arun Jacob9-Sep-09 23:24 
GeneralRe: about substring Pin
Arun Jacob9-Sep-09 23:26
Arun Jacob9-Sep-09 23:26 
GeneralRe: about substring Pin
Rajeshwar Code- Developer9-Sep-09 23:32
Rajeshwar Code- Developer9-Sep-09 23:32 
AnswerRe: about substring Pin
Arun Jacob9-Sep-09 23:32
Arun Jacob9-Sep-09 23:32 
GeneralRe: about substring Pin
Rajeshwar Code- Developer9-Sep-09 23:45
Rajeshwar Code- Developer9-Sep-09 23:45 
AnswerRe: about substring Pin
Arun Jacob9-Sep-09 23:50
Arun Jacob9-Sep-09 23:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.