tags:

views:

38

answers:

1

Hello all, I am developing an web application following the 3 tier architecture.When i am hitting on submit button data is storing in database but not showing response message like "Record submitted successfully" and fields are not refreshing. Here is my code:

protected void BtnSubmit_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
            return;

        NewuserBAL NUB = new NewuserBAL();    

        string UserName = TxtUserName.Text;
        string Password = PWD.Text;
        string EmailId = Email.Text;

        try
        {
            NUB.newinsert(UserName, Password, EmailId);
            Response.Write("<b>New User Created Successfully</b>");
            TxtUserName.Text = "";
            PWD.Text = "";
            CnfrmPwd.Text = "";
            Email.Text = "";
        }
        catch
        {
            throw;

        }

        finally
        {
            NUB = null;

        }


    }

Thanks, Masum

+1  A: 

Rather than using Response.Write, set a label such as labelResults to display the outcome. Response.Write is not going to show up in the proper place in your rendered HTML.

DavGarcia
Thank you sir.........Its working fine now.
Masuma Aktar