Click here to Skip to main content
15,880,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Database as follows;

SQL
Bthid  bigint (Datatype in the Database)

  Startexec table (Records as follows)

  Bthid

   718



I am passing the Bthid the database value from Startexec table using session and redirect to another page.

My code as follows;


C#
SQl = "Select Bthid from startexec";
        BthID = TxtBthNo.Text.ToString().Trim();
        Session["Bthid"] = BthID;
        Response.Redirect("Instruction.aspx");


In database Bthid Datatype is bigint

When i run Error as follows;

Cannot implicitly convert type 'string' to 'long'

for that how can i do using csharp?

i tried several times but it is not working? please help me.'

how can i solve?

Regards,
Narasiman P
Posted
Updated 3-May-13 3:46am
v2
Comments
Naz_Firdouse 3-May-13 9:52am    
why are you posting the same question again and again?
you already posted similar question here...
http://www.codeproject.com/Questions/587423/passingplustheplusdatabaseplusvalueplusplususingpl

you can use the Improve question link and improve your code...
Don't post the same again as a new question

1 solution

Try changing:

C#
BthID = TxtBthNo.Text.ToString().Trim();


To

C#
BthID = Convert.ToInt64(TxtBthNo.Text.Trim());
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900