Home > Ask the Microsoft .Net Development Experts > ASP.NET and Web Development Questions & Answers > Creating a generic search facility
Ask The Win Development Expert: Questions & Answers
EMAIL THIS

Creating a generic search facility

Daniel Cazzulino EXPERT RESPONSE FROM: Daniel Cazzulino

Pose a Question
Other Win Development Categories
Meet all Win Development Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 27 August 2004
I want to create a generic search facility in my ASP.NET project, using VB.NET as the code-behind. On certain fields in my main page, I would like to create a popup window, displaying a dataset in a datagrid control for the user to select from. After a record in the grid has been highlighted, I want to close the popup window and send a field from the datagrid control back to a textbox in my main aspx page.

I don't want to use the Response.Redirect method because it only redirects to another "main" page and will not have the look and feel of a popup. I have read about the windo.open method using java script in client-side scripting which I execute correctly now with embedded code in the code-behind of my main aspx page.

The problem is to create a datagrid control on a popup window. Should I put a datagrid control on an aspx page, load it with a dataset and then load it in the window.open method? What are your suggestions? I would like to keep all code in the code-behind if possible, will just ease future maintenance. Would appreciate any help.

>
You're on the right track! You just have to call window.open pointing to an aspx file that contains the datagrid. Of course, you could pass querystring parameters to customize the grid depending on selection on the "main" page. When the row the user is interested in is selected or clicked, you can easily plug a little javascript to set a variable on the parent window (window.parent) that will help it identify the selected value, or even directly modify the textbox, and after that, just call window.close() to close the popup.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
ASP.NET
Top ASP.NET expert advice from Danny Cazzulino
Access VB .NET Windows control on client side
Drop down list server control creates error message
How to retrieve the MAC address of a client using ASP.NET
How to sort a dropdown list in ASP.NET
Accessing session variables in different pages
Automatically closing a .exe
Accessing a control on an independent application
Checking input by character to verify validity
Referencing an old Crystal Reports version

ASP.NET and Web Development
Top ASP.NET expert advice from Danny Cazzulino
Access VB .NET Windows control on client side
Drop down list server control creates error message
Take care with InitializeComponent
Calling via command prompt from ASP.NET
Screen capturing
How to retrieve the MAC address of a client using ASP.NET
How to sort a dropdown list in ASP.NET
Accessing session variables in different pages
Automatically closing a .exe

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Windows Development - White Papers, News and Expert Advice
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts