Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Press enter to seach?

Author  Topic 

bscivolette
Starting Member

9 Posts

Posted - 2012-10-02 : 20:55:39
Good Evening,

I have another absurdly (and seemingly) simple bug that I have been trying to solve for over an hour with no luck.

I have another search function that contains two text field inputs: zip code and name. If you enter a zip code you can search by clicking the 'search' button or by clicking enter. However, if you enter a value in the 'name' field you have to click the button, 'enter' will not execute the search.

I figured that by comparing the code for the two inputs I would be able to find the solution - No so much! I have search the search control, the BLL referenced in the search string and much, much more. I've also tried using the properties explorer and have not been able to find any differences in the two searches.

Any idea on how to solve this?

bscivolette
Starting Member

9 Posts

Posted - 2012-10-02 : 21:17:10
I've continued to research this further and found that it could be that I need to assign the "defaultbutton" property. Apparently I have to redesign the search layout to use multiple <asp: panel> tags to achieve multiple default buttons.

I also discovered the if I have a value in the 'zip code' field and a value in the 'name' field it will work when I click enter. Not sure if that means anything...
Go to Top of Page

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2012-10-02 : 21:24:53
And this relates to SQL Server how?
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2012-10-03 : 01:35:48
This sounds like a problem at the application layer. If you feed that the prpblem extends to SQL Server - you can use SQL Server Profiler to identify code running - which can assist in troubleshooting

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-10-03 : 06:52:05
quote:
Originally posted by bscivolette

I've continued to research this further and found that it could be that I need to assign the "defaultbutton" property. Apparently I have to redesign the search layout to use multiple <asp: panel> tags to achieve multiple default buttons.

I also discovered the if I have a value in the 'zip code' field and a value in the 'name' field it will work when I click enter. Not sure if that means anything...

Either that, or you will need to add an event handler to the default button to process the data to handle both cases.

But, like others pointed out, this forum is for SQL Server related questions/discussions; so you are likely get faster/better responses at an Asp.net forum.
Go to Top of Page
   

- Advertisement -