Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 05, 2012 10:31 AM by sriramabi
May 05, 2012 05:32 AM|LINK
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="edit0" CommandArgument='<%# Eval("Emp_ID") %>'>edit</asp:LinkButton>
and here compiler give me null
Emp_ID = int.Parse(e.CommandArgument.ToString());
May 05, 2012 05:54 AM|LINK
If you find that your stored procedure is perfectly alright then :
1.)check what parametrs value that are going to stored procedure from your code
2.)what is the type and length of the parameters you have specified in your procedure and whatr is the length of the parameter that is going to the procedure from your code.
Hope this helps.................
May 05, 2012 06:13 AM|LINK
parameter i commandargument i added above it has the same
name and same type
May 05, 2012 06:55 AM|LINK
not same name and type for the arguments then you should check the length of the arguments like if you have given a parameter VARCHAR(5) in stored procedure and you are sending "HIITHEREIMPROGRAMMER"(this string length is more than 5) from your code as string
then in that case your stored procedure will not give any error niether it will return any result i mean you should check like this for every parameter in your stored procedure.......
Please let me know if this is not the problem.
PLEASE mARK THIS AS ANSWER IF IT HELPS.
Hope this helps......
May 05, 2012 08:38 AM|LINK
friend this is not a problem because the arguments found in database
May 05, 2012 09:50 AM|LINK
can you please specify what you are saying because i didnt get it .......
May 05, 2012 10:31 AM|LINK
change this line
SqlParameter param = new SqlParameter;
and pls check this