Skip to main content
Email Password   helpLost your password?
Screenshot - Lookup.jpg

Introduction

This simplifies the way to enter lookup values in a textbox.
I have used GridView to return lookup values for FormView control.

You can use the lookup to return a value to any ASP.NET textbox control.

I have used two lookup pages, lookupSupplier.aspx and lookupCategory.aspx. These two lookup pages work for main page default.aspx page which has FormView control that is used for inserting and editing the Products table.

Background

You must know how the GridView control works.

Using the Code

The following is an example of creating a template column for GridView control.

You need to add an ASP.NET hyperlink control for a template column. This hyperlink will be used to return the value(text) in column one (column index 0) of the GridView control.

<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="hlReturnLookupValue" runat="server">Select</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>

Points of Interest

Try to use caching for lookup pages so that lookup pages get opened quickly and work fast. However, this is not essential.

History

I will update this page based on your feedback.

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralWhy not a listbox Pin
Donsw
4:12 8 Dec '08  
GeneralRe: Why not a listbox Pin
Amit K Bhagat
10:55 23 Oct '09  
GeneralMy vote of 2 Pin
Ruchit Surati
23:37 24 Nov '08  
GeneralHow can I download the video version of this article? Pin
sunisagar
11:50 20 Nov '08  
GeneralRe: How can I download the video version of this article? Pin
Amit K Bhagat
18:21 20 Nov '08  
GeneralRe: How can I download the video version of this article? Pin
Amit K Bhagat
21:07 21 Nov '08  
GeneralRe: How can I download the video version of this article? Pin
Amit K Bhagat
20:17 22 Nov '08  
GeneralGood one. Pin
Member 3826275
12:30 30 Oct '08  
GeneralRe: Good one. Pin
Amit K Bhagat
18:09 30 Oct '08  
QuestionVideo username and password Pin
Arvin Meralpis
17:31 20 Jun '07  
AnswerRe: Video username and password Pin
Amit K Bhagat
23:51 20 Jun '07  
GeneralRe: Video username and password Pin
Arvin Meralpis
9:12 25 Jun '07  
Generalhelp Pin
Chard_olea
1:45 1 Apr '07  
GeneralRe: help Pin
Amit K Bhagat
1:53 1 Apr '07  
GeneralRe: help Pin
Chard_olea
2:01 1 Apr '07  
Generalvideo Pin
Chard_olea
0:48 1 Apr '07  
GeneralRe: video Pin
Amit K Bhagat
0:50 1 Apr '07  
GeneralRe: video Pin
Amit K Bhagat
0:54 1 Apr '07  
GeneralRe: video Pin
Chard_olea
0:55 1 Apr '07  
QuestionHow can i fix javascript:// error? Pin
sheahad
19:58 27 Mar '07  
AnswerRe: How can i fix javascript:// error? Pin
Amit K Bhagat
20:00 27 Mar '07  
AnswerRe: How can i fix javascript:// error? Pin
Amit K Bhagat
20:09 27 Mar '07  
GeneralRe: How can i fix javascript:// error? Pin
sheahad
20:33 27 Mar '07  
GeneralRe: How can i fix javascript:// error? Pin
Amit K Bhagat
20:45 27 Mar '07  
GeneralRe: How can i fix javascript:// error? Pin
sheahad
20:51 27 Mar '07  


Last Updated 22 Nov 2008 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009