Subscribe to Subscribers
Talk to Webmaster Tony John

Forums » .NET » ASP.NET »

Controls not getting focus correctly


Posted Date: 30 Jul 2012      Posted By:: SonyMadhu     Member Level: Gold    Member Rank: 45     Points: 4   Responses: 3



Hi,




In my form when i click on any control textbox/ any for first time ift is getting focus.
But next time when i click on any other control it is going to edit mode but focus is going to previously selected control
Ex:
t1, t2 2 text boxes.
first i clicked on t1, it is going to edit mode and getting focus.
When i clicked on t2, it is going to edit mode but t1 is getting focus instead of t2.

If any one have idea let me know


Regards,
Madhu
Be so hapy wen others look at you,they become hapy too




Responses

#682376    Author: Anil Kumar Pandey      Member Level: Platinum      Member Rank: 1     Date: 30/Jul/2012   Rating: 2 out of 52 out of 5     Points: 2

You need to set the tab index. once the control get in edit mode the control need to be focused on the same control itself. Please make use of the tab index and txt.Focus() property.

Thanks & Regards
Anil Kumar Pandey
Microsoft MVP, DNS MVM



 
#682384    Author: Asheej T K        Member Level: Diamond      Member Rank: 2     Date: 30/Jul/2012   Rating: 2 out of 52 out of 5     Points: 2

Hi,
It seems strange... when you are getting this issue? is it in the run time? Also what you meant by edit mode? Are you clicking on any button to enable the textbox? Please provide complete details.


Regards,
Asheej T K
Microsoft MVP[ASP.NET/IIS]
DotNetSpider MVM

Dotnet Galaxy



 
#682515    Author: Paritosh Mohapatra      Member Level: Diamond      Member Rank: 6     Date: 30/Jul/2012   Rating: 2 out of 52 out of 5     Points: 2

Is the page posted back when the focus goes out of the first TextBox. It seems like TextBox's AutoPostBack property is set to true and you have written some code in the TextChanged event of the TextBox.

Please share your code...


Thanks & Regards
Paritosh Mohapatra
Microsoft MVP (ASP.Net/IIS)
DotNetSpider MVM






 
Post Reply
You must Sign In to post a response.

Next : The line break is not working
Previous : The line break is not working properly
Return to Discussion Forum
Post New Message
Category:

Related Messages
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.