Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search - Select From List 1

Status
Not open for further replies.

SpiderBear6

Programmer
Sep 17, 2003
422
AU
Hi all,

I have a web page which has a list of registrations on it. On this same page, I have a Search button which goes to another web page where the user can select criteria to specialise the registrations shown. For example, if they selected to only show user (as opposed to company) registrations on the search page then when they clicked ok on the search page, they would be taken back to the registrations web page with only the user registrations showing.

Each registration is associated with a particular licence. In the search page, I want the users to be able to search a particular licence. So for example, if they select licence 23 then only the registrations for licence 23 will be shown in the registrations list. Unfortunately the users don't know the licence numbers of the licences so I need to show a list of licences that the user can select from. Initially I thought I would just bring up another page with all of the licences that the user can select from, but then I thought I might have problems going back to the search page with the selected licence number. Another way I thought of was to have the licence list in a frame in the search page, so that if the user wanted to search based on the licence, then they would click on a button, the licence frame would become visible, they would select the licence and I would put that number in the search page.

I think the frame would be a cleaner approach because it would all still be on the same page, but does anyone have any better ideas?

Thanks in advance.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
Hi SpiderBear

Sorry if I misunderstand your question and this is way to simple an answer - it is monday morning! Can you not just use a DropDownList. Populate the values with the numbers for the licenses and the text with the human readable names? When you postback you grab the value of the selected licence not the text for processing in your code-behind...

Rob

Go placidly amidst the noise and haste, and remember what peace there may be in silence - Erhmann 1927
 
The licences don't really have human readable names. You select a licence based on it's attributes. But you do have a good idea. Maybe I could put the common details that the user would use to select a licence in the dropdown list. For example, product, organisation, type etc. Can you format the drop down so that it is a grid?

BTW: thanks for replying Rob.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
No. You can't format the dropdownlist as a grid. .NET will automatically render a html select list for a dropdown so you couldnt have a grid. You could use a datagrid though...

Having re-read you initial post I'm thinking perhaps this is something you can solve client side? Depending on the number of licenses not making the UI to unwieldly, you could have the licences in a <div> with its style set to display:none. This wouldn't appear in the browser at all but is still in the code and hence the client side DOM. This could then be &quot;shown/hidden&quot; using javascript from the button to &quot;search by licence&quot;...
Code:
<input type=&quot;button&quot; onclick=&quot;document.getElementById('licenses').style.display='block';&quot; />
<div id=&quot;licences&quot; style=&quot;display:none&quot;>
<!-- Your code to display licenses with presumably some controls to postback the form and repopulate the registrations drop down based on licence as this reloads the page it would cause this div to be hidden again
:)
Code:
 -->
</div>
Don't know if this is what your looking for but hope it helps.

Rob

Go placidly amidst the noise and haste, and remember what peace there may be in silence - Erhmann 1927
 
Sounds interesting... I'll try it out.

Thanks.

--------------------------------------
&quot;We are star-stuff. We are the universe made manifest trying to figure itself out.&quot;
-- Delenn in Babylon 5 - &quot;A Distant Star&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top