Click here to Skip to main content
16,010,876 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to refresh asp.net page without getting blank Pin
codelinks15-Aug-07 20:31
codelinks15-Aug-07 20:31 
GeneralRe: How to refresh asp.net page without getting blank Pin
Ratnadeep_Raul16-Aug-07 18:35
Ratnadeep_Raul16-Aug-07 18:35 
Questionwebserver Pin
boyindie9-Aug-07 22:51
boyindie9-Aug-07 22:51 
AnswerRe: webserver Pin
R. Giskard Reventlov10-Aug-07 0:52
R. Giskard Reventlov10-Aug-07 0:52 
GeneralRe: webserver Pin
boyindie10-Aug-07 0:54
boyindie10-Aug-07 0:54 
GeneralRe: webserver Pin
R. Giskard Reventlov10-Aug-07 1:08
R. Giskard Reventlov10-Aug-07 1:08 
Questionhow to parse xml string not xml file Pin
deepalititi9-Aug-07 22:49
deepalititi9-Aug-07 22:49 
QuestionInserting data into a database Pin
Mamphekgo Bahula9-Aug-07 22:43
Mamphekgo Bahula9-Aug-07 22:43 
Hi i am trying to insert data into a database using store procedure but it gives me this error "An SqlParameter with ParameterName '@Name' is not contained by this SqlParameterCollection" and here is my code


string conString = @"Data Source=DAKESERVER;Initial Catalog=Customer;User ID=sa";
SqlConnection conCustomer = new SqlConnection(conString);
conCustomer.Open();
try
{
SqlCommand cmdCustomer = new SqlCommand("AddCustomer");
cmdCustomer.Connection = conCustomer;
cmdCustomer.CommandType = CommandType.StoredProcedure;

cmdCustomer.Parameters["@Name"].Value = txtName.Text.ToString();
cmdCustomer.Parameters["@Surname"].Value = txtSurname.Text.ToString();
cmdCustomer.Parameters["@Address"].Value = txtAddress.Text.ToString();
cmdCustomer.Parameters["@Telephone"].Value = txtTelephone.Text.ToString();

if (cmdCustomer.ExecuteNonQuery() == 1)
{
lblMessage.Text = "Record inserted";
}
else
{
lblMessage.Text = "record not inserted";
}
}
catch (Exception ex)
{
lblMessage.Text = ex.Message;
}
finally
{
conCustomer.Close();
}


Mamphekgo

AnswerRe: Inserting data into a database Pin
Imran Khan Pathan9-Aug-07 23:17
Imran Khan Pathan9-Aug-07 23:17 
GeneralRe: Inserting data into a database Pin
Mamphekgo Bahula10-Aug-07 0:19
Mamphekgo Bahula10-Aug-07 0:19 
QuestionThe state information is invalid for this page and might be corrupted in asp.net Pin
Ramesh Devalla9-Aug-07 22:37
Ramesh Devalla9-Aug-07 22:37 
QuestionPopulate ListBox with XML Data? Pin
chand109-Aug-07 22:28
chand109-Aug-07 22:28 
AnswerRe: Populate ListBox with XML Data? Pin
Imran Khan Pathan9-Aug-07 23:23
Imran Khan Pathan9-Aug-07 23:23 
GeneralRe: Populate ListBox with XML Data? Pin
chand109-Aug-07 23:41
chand109-Aug-07 23:41 
GeneralRe: Populate ListBox with XML Data? Pin
Imran Khan Pathan9-Aug-07 23:57
Imran Khan Pathan9-Aug-07 23:57 
GeneralRe: Populate ListBox with XML Data? Pin
chand1010-Aug-07 0:42
chand1010-Aug-07 0:42 
GeneralRe: Populate ListBox with XML Data? Pin
Imran Khan Pathan10-Aug-07 1:27
Imran Khan Pathan10-Aug-07 1:27 
AnswerRe: Populate ListBox with XML Data? Pin
Piyush Vardhan Singh9-Aug-07 23:46
Piyush Vardhan Singh9-Aug-07 23:46 
GeneralRe: Populate ListBox with XML Data? Pin
Piyush Vardhan Singh9-Aug-07 23:55
Piyush Vardhan Singh9-Aug-07 23:55 
GeneralRe: Populate ListBox with XML Data? Pin
chand1010-Aug-07 0:04
chand1010-Aug-07 0:04 
Questionvirtual directory to install a web service - error during installation Pin
steve_rm9-Aug-07 22:27
steve_rm9-Aug-07 22:27 
QuestionControl state Pin
Sohaib_pak9-Aug-07 22:26
Sohaib_pak9-Aug-07 22:26 
QuestionHow to display xml data in hierarchial grid in asp.net application Pin
Pravat Sharma9-Aug-07 21:49
Pravat Sharma9-Aug-07 21:49 
Questionip-address Pin
Sonia Gupta9-Aug-07 21:38
Sonia Gupta9-Aug-07 21:38 
AnswerRe: ip-address Pin
Talal Sultan9-Aug-07 22:37
Talal Sultan9-Aug-07 22:37 

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.