Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0SetFormFocus(Control) works only on Page_Load??SetFormFocus(Control) works only on Page_Load??
Previous
 
Next
New Post
1/15/2008 3:31 PM
 

Hi everybody.

 

I'm trying to set focus to other textbox when the user clicks button.

I use SetFormFocus(Control)  on Page_Load to specify the textbox wich needs to get the focus when the page loads, but it doesn't works when the user clicks a button and the focus must change to other textbox.

this is the page_load event

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadTryIf Not Page.IsPostBack Then

 

DotNetNuke.Common.Globals.SetFormFocus(txtNoCliente) End IfCatch exc As Exception 'Module failed to load

ProcessModuleLoadException( 

Me, exc)End Try

 

End Sub

 

and the button_click event:

 

 

 

Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.ClickEnd Sub

 DotNetNuke.Common.Globals.SetFormFocus(txtBuscaArticulo)

 

End Sub

If anyone can help me :S

 thanks in advance

 

 

 

 

 

 
New Post
8/15/2008 11:24 AM
 

Do you have AJAX controls on your page?  If so, I think there is an issue.  I'm having the same problem and it appears that in the age of AJAX the SetformFocus is now useless.  I've seen it discussed a couple of times but I have yet to see any wise men illuminate the way on this one...


I'm too poor for anything other than the community version
 
New Post
8/15/2008 12:07 PM
 


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0SetFormFocus(Control) works only on Page_Load??SetFormFocus(Control) works only on Page_Load??


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out