Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  SetFormFocus(Control) works only on Page_Load??
Previous Previous
 
Next Next
New Post 1/15/2008 12:31 PM
Unresolved
User is offline o5k4r.m4dr1d
7 posts
o5k4r.no-ip.info
10th Ranked


SetformFocus(Control) works only on Page_Load?? 

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 9:24 AM
User is offline Ryno
293 posts
9th Ranked




Re: SetformFocus(Control) works only on Page_Load?? 

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 use DNN version 4.8.1
 
New Post 8/15/2008 10:07 AM
User is offline Michael Washington
2837 posts
ADefWebserver.com
5th Ranked










Re: SetformFocus(Control) works only on Page_Load?? 

see: http://forums.asp.net/t/1115321.aspx

 



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  SetFormFocus(Control) works only on Page_Load??
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Web Hosting w/ ASP.NET 3.5
Unlimited email boxes, Unlimited databases, Unlimited domains. Plans start at $4.97
www.MyWinHosting.com
SteadyRain
Founded in 1999, SteadyRain has extensive experience delivering Internet technology strategies and solutions for a diverse client base, ranging from Fortune 500 firms to successful start-ups.
www.steadyrain.com
AfterImage Internet Consulting and SEO Services
AfterImage provides search engine optimization (SEO), Internet consulting and hosting services for the Windows platform (IIS, ASP, SQL Server).
www.afterimage.nl/

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP