473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

trying to learn C# and .NET programming

7
Hi all
i am trying to learn C# and .NET programming ..here is my program..
Expand|Select|Wrap|Line Numbers
  1. protected void btn_Save_Click(object sender, EventArgs e)
  2.     {
  3.  
  4.         dbRead _dbRead = new dbRead();
  5.         dbTrans _dbTrans = new dbTrans();
  6.  
  7.       try
  8.         {
  9.  
  10.             Sp_Cls_CompanyDetails clsCompany = new Sp_Cls_CompanyDetails(lbl_companyId.Text,
  11.             txt_CompanyName.Text,
  12.             txt_Addressline1.Text,
  13.              txt_Email.Text,
  14.             txt_Notes.Text,
  15.             chk_Enabled.Checked,
  16.             DateTime.Now.ToString,
  17.             DateTime.Today.ToString,
  18.             lbl_ownerid.Text);
  19.  
  20.  
  21.             if (btn_Save.Text != "Update")
  22.             {
  23.                 clsCompany.sp_companyInsert(ref _dbTrans);
  24.                 lbl_companyId.Text = clsCompany.CompanyID.ToString();
  25.                 btn_Save.Text = "Update";
  26.  
  27.             }
  28.  
  29.         }
  30.  
  31.         catch (Exception ex)
  32.         {
  33.  
  34.             Response.Write(ex.Message);
  35.         }
  36.  
  37.     }
  38.  
//dbread ,dbtrans and Sp_Cls_CompanyDetails are class files
Error :: cannot convert from 'bool' to 'string',
cannot convert to int to string..
cannot convert from 'method group' to 'string' ...

please anyone help this program..
May 25 '07 #1
5 1424
RedSon
5,000 Expert 4TB
What are the line numbers for you errors?
May 25 '07 #2
Plater
7,872 Expert 4TB
Some of your .ToString's are missing their ().
Also if you goto the line number refered to by the stacktrace of the exception, you should be able to find your way to the line where you are inoccrectly casting those values to strings
May 25 '07 #3
ragavi
7
What are the line numbers for you errors?


the line number is 44 ,45,49 and 91..
the line numer 89 error is can not convert form bool to string.


thank you.
May 26 '07 #4
ragavi
7
hi thanks for u reply..
line number 91 error: cannot conver bool to string..
May 26 '07 #5
Plater
7,872 Expert 4TB
hi thanks for u reply..
line number 91 error: cannot conver bool to string..
So go to line 91 and fix it?
May 29 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: Rob | last post by:
i know javascript, vbscript, asp css and alot more and im only 14 i was wondering which is easier to learn php or cgi. any help?
42
by: Bicho Verde | last post by:
I have now free time and money to do what I want :-) I have some basic skills in programming (C, Pascal, Macromedia Actionscript) but don't know exactly what to do in the world of programming. And...
55
by: Elijah | last post by:
I have read many of the topics on learning C++ or Java first. It seems like everyone says something different. I would like to know if I should learn C++ or Java. First a little about myself. I...
4
by: Mark Reed | last post by:
Guru's, From most of the posts here, I can see that knowledge of VB is a great advantage. Could anyone suggest a good site to learn VB from starting at the very beginning as I have no experience...
21
by: TAM | last post by:
Hi, I read that ASP.NET uses VB.NET instead of VBScript. I also read that ASP.NET is a subset of VB.NET. So if I learn VB.NET first then do I have the knowledge for programming ASP.NET...
14
by: GUSTAVO V. P. | last post by:
Hello, my name is Gustavo and I want to know: What one needs to be a good programmer of computers? Which your advice are to be a good programmer? How is the logic acquired? Is it true that...
40
by: dydx13 | last post by:
Hello, I'm currently attending a university majoring in Computer Science. I took C and C++ at a community college and got an A in both classes. That was three years ago. I have not programmed or...
34
by: pandit | last post by:
hai all, i want to become a good programmer. one of my friends ( named "arnuld", he posts here infrequently), taught me Lisp. so i am not a programming beginner. i have heard these 2 points....
7
Banfa
by: Banfa | last post by:
Posted by Ganon11 So, you want to learn how to program! Good for you! Programming is a very intruiging and fun activity to pick up, and it's also a great career choice if you like it! Finally,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.