Saturday, March 24, 2012

set focus to form after postback

Hi.

I have one datalist and i have done custom paging for it.

I have four link button "First","Previous","Next", "Last" for paging datalist

Now I want to do paging on key press like as Right arrow for Next,Left Arrow for Previous,..........

for that I am calling javascript on onkeypress event of form.

Now Its working fine but problem is that javascript is called only on form key press event.

so that I want to set out focus on form after every post back.

I am calling following line at last but not working.

this.form1.Focus();

plz any one can help me?

best regard

pathan

Try this Just a guess

<formdefaultfocus="form1"id="form1"runat="server">


not helpful

0 comments:

Post a Comment