Hi experts,
I have this simple form that is driving me crazy. Basically i have two tables in the database, one that stores OrgID , a username and password where loginID is primary key and another one that stores data entry per each organization where dataEntryID is primary key.
I have a simple form in asp.net and C# that will insert information to this tables, retrieve and update all in the same page.
My insert function works well, retrive function works well but when i try to update that's where it is not saving.
I create a session["dataEntryID"] after i save a data entry and I tested that, works fine everytime i click save, the information goes in and lblmessage.text displays me the session number.
When i do page load, that number dissapers.
The error i get when i click the update is "Error converting data type nvarchar to int. " this is so general, i don't think i have a conversion problem.
When i place this on page load, check if sessions are working on page load
if (Session["sOrgID"] != null && Session["DataEntryID"] != null)
{
Bind_Data();
Bind_DataID();
IDja.Text = Session["DataEntryID"].ToString();
}
the data bind no longer are displaed, meaning that my DataEntryID session is not working . Also my IDja.text is not showing.
I think i need the dataEntryID
Any suggestion.
thanks in advance.
The error is not in this piece of code.
The Error is in UPDATE method.
can you post that code.