i have two table in db:
table1: id(pk) int,firstname varchar(20),lastname varchar(20),username varchar(30),passwrod varchar(15)
table2:fscmarks int,metricmarks int,id(fk) int
stored procedure for table2:
create proc academic
(
@fscmarks int,
@metricmarks int
as
begin
declare @id int
select @id=CURRENT_IDENT('table1');
insert into table2 values(@fscmarks,@metricmarks,@id);
)
and behind login click is set session variable like this:
Session["id"]=txtemail.Text;
Response.Redirect("academic.aspx");
and on academic.aspx.cs i pass this:
SqlParameter id = new SqlParameter("id", Session["id"].ToString());
but it not working and catch the error, now suggest me what i do???
Thanks in Advance