Do a database query on Textbox onblur event

Posted by user279521 on Stack Overflow See other posts from Stack Overflow or by user279521
Published on 2010-03-11T18:47:09Z Indexed on 2010/03/11 18:49 UTC
Read the original article Hit count: 318

Filed under:
|

I am using asp.net 3.5 with C#. I need to do a database lookup when a user enters ProductID in txtProductID. I guess doing javascript is out of the question since this will have to be server side call. I wrote this code in the page_load event of the webpage:

        protected void Page_Load(object sender, EventArgs e)
    {
        txtProductID.Attributes.Add("onblur", "LookupProduct()");
    }

        protected void LookupUser()
    {
        //Lookup Product information on onBlur event;
    }

I get an error message: Microsoft JScript runtime error: Object expected How can I resolve this ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-3.5