Instead of getting the code this much complex you can go for stored proceure
simply add lblname.Text as parameter to the procedure
And ur procedure shold be as:
create procedure proc1
@name varchar(50)
as
declare @name1 varchar(50)=null
declare @id1 int=0
begin
select @name1=UserName from JUWUser
if @name=@name1
begin
select @id1=UserId from aspnet_Users where UserName =@name
insert into JUWUser(u_id) values (@id1)
end
end