Question

Disable/Enable Links to another page...

Asked by: dmasini

Experts...

Yes...still a rookie here so I'll try to be as clear as possible.  I have 2 .aspx pages:

Page 1) products_lookup22.aspx
Page 2) products_EMail.aspx

"Page 1" has a search then a gridview (Like a Summary) that list general information about a product as in:

(Summary)
             "Catalog"                   "Vendor"                    "Description"                 "Rec#"
details   77L8453001D           ADVANCE                 400 WHPS BLST             38
details   TQC1110WL             GE-ED&C                   BRKR CIRCUIT 1P10A     1424
details   ICQ693MDL330        GE-ED&C                    OUT MODULE 2A           1674
details   IC697PWR711          GE-FANUC                 9070 POW SUP              1682
(ETC...)


IF the user clicks on the link "details" we open a "DetailsView" just below the summary grid that provides specifics on just the single record (example: we click "details" for record 38).  We see...

(Details)
Vendor:            ADVANCE
CATALOG:       77L8453001D
DESCRIPTION:  400 WHPS BLST            
NAED V/I:         781087-11529
SOLD BY:        EA
IN STOCK:        6
LIST PRICE:      $133.66    

Now the problem is when I first bring up the first page (products_lookup22.aspx) it has a Search box that cannot be blank (using a validator)...so when the user enters any text/values it does the search BUT I (currently) provide a link to page 2 (products_EMail.aspx) that needs to pass the param RecordID2.  If they don't click on a specific detail in the Summary we have no param to pass and it blows up (obviously)!

I need to "Grey Out" the option "Request a Quote for this Item..." until they actually click on the detail link (as shown in products_lookup22.aspx).  Once they do it needs to 'enable' the link "Request a Quote for this Item...".

Any ideas would be appreciated.  Code Snippet attanched.

Thanks again...

dm

<%@ Page Language="VB" Debug="True" %>
 
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<script runat="server">
 
Protected Sub DetailsView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewPageEventArgs)
End Sub
 
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
 
Protected Sub SqlDataSource2_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs)
End Sub
    
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
Me.HyperLink1.NavigateUrl = "~/products_EMail.aspx?RecordID2=" & GridView1.DataKeys(GridView1.SelectedIndex).Value.ToString
End Sub
    
</script>
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Product Inquiry</title>
</head>
<body>
<form id="form1" runat="server">
<div>
&nbsp;
 
<asp:Panel ID="Panel1" runat="server" Height="1px" Width="850px" style="left: 4px; position: absolute; top: 10px;">
 
<asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Small" Style="font-weight: bold;font-size: 12pt; color: darkblue; font-style: normal; font-family: verdana;" Text="Search for:" Width="104px"></asp:Label>
 
<asp:TextBox ID="TextBox2" runat="server" Width="316px"></asp:TextBox>
<asp:Button ID="Button2" runat="server"
Text="Go..." Width="84px" style="position: absolute; top: 1px" /><br />
 
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
 
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox2"
ErrorMessage="(Search Box cannot be Blank...)" SetFocusOnError="True"></asp:RequiredFieldValidator>
            
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
<asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Size="Small" Style="font-weight: bold;font-size: 10pt; color: darkblue; font-style: normal; font-family: verdana;" Text="Total Records found:" Width="176px"></asp:Label><br />
 
<br />
<asp:Image ID="Image2" runat="server" ImageUrl="~/images/summary-banner.jpg" /><br />
                    
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellPadding="2" DataSourceID="SqlDataSource2" ForeColor="#333333"GridLines="None" DataKeyNames="RecordID"OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
 
<PagerSettings FirstPageImageUrl="~/images/first-record.bmp" FirstPageText="First Page..." LastPageImageUrl="~/images/last-record.bmp" LastPageText="Last Page..." Mode="NextPreviousFirstLast"
NextPageImageUrl="~/images/next-record.bmp" NextPageText="Next Page..." Position="Top" PreviousPageImageUrl="~/images/previous-record.bmp" PreviousPageText="Previous Page..." />
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /
<Columns><asp:CommandField SelectText="Details" ShowSelectButton="True">
<HeaderStyle BackColor="#C00000" Font-Bold="True" Font-Size="X-Small" HorizontalAlign="Left"Width="30px" Wrap="False" />
<ItemStyle Font-Bold="True" Font-Size="X-Small" HorizontalAlign="Left" Width="30px"Wrap="False" />
</asp:CommandField>
                    
<asp:BoundField DataField="CTCATALOG" HeaderText="Catalog" SortExpression="CTCATALOG">
<HeaderStyle BackColor="#C00000" Font-Bold="True" Font-Size="X-Small" HorizontalAlign="Left"
Width="200px" Wrap="False" />
<ItemStyle Font-Bold="True" Font-Size="X-Small" HorizontalAlign="Left" Width="200px"
Wrap="False" />
</asp:BoundField>
                    
<asp:BoundField DataField="CTMFGNAME" HeaderText="Vendor" SortExpression="CTMFGNAME">
<HeaderStyle BackColor="#C00000" Font-Size="X-Small" HorizontalAlign="Left" Width="150px" />
<ItemStyle Font-Bold="True" Font-Size="X-Small" HorizontalAlign="Left" Width="150px"
Wrap="False" />
</asp:BoundField>
 
<asp:BoundField DataField="CTDESCRIPTION" HeaderText="Description" SortExpression="CTDESCRIPTION">
<HeaderStyle Font-Size="X-Small" HorizontalAlign="Left" Width="200px" Wrap="False" BackColor="#C00000" />
<ItemStyle Font-Bold="True" Font-Size="X-Small" HorizontalAlign="Left" Width="200px"
Wrap="False" />
 
</asp:BoundField><asp:BoundField DataField="RecordID" HeaderText="Rec#" InsertVisible="False" SortExpression="RecordID">
<HeaderStyle BackColor="#C00000" Font-Bold="True" Font-Size="X-Small" HorizontalAlign="Right"
Width="32px" Wrap="False" />
<ItemStyle Font-Bold="True" Font-Size="X-Small" HorizontalAlign="Right" Width="32px"
Wrap="False" />
</asp:BoundField>
                
</Columns>
<PagerStyle BackColor="#C00000" ForeColor="#333333" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="Navy" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#C00000" Font-Bold="True" ForeColor="White" Width="636px" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/details-banner.jpg" Width="632px" /><br />
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" CellPadding="2"
DataSourceID="SqlDataSource3" ForeColor="#333333" GridLines="None" Height="50px"
                    OnPageIndexChanging="DetailsView1_PageIndexChanging" Width="632px">
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<CommandRowStyle BackColor="#FFFFC0" Font-Bold="True" />
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<FieldHeaderStyle BackColor="#FFFF99" Font-Bold="True" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
 
<Fields>
<asp:BoundField DataField="CTMFGNAME" HeaderText="Vendor:" SortExpression="CTMFGNAME">
<HeaderStyle BackColor="Navy" Font-Bold="True" Font-Size="Small" ForeColor="White"
HorizontalAlign="Right" Width="100px" Wrap="False" />
<ItemStyle Font-Bold="True" Font-Size="Small" />
</asp:BoundField>
                        
<asp:BoundField DataField="CTCATALOG" HeaderText="Catalog:" SortExpression="CTCATALOG">
<HeaderStyle BackColor="Navy" Font-Bold="True" Font-Size="Small" ForeColor="White"
HorizontalAlign="Right" Width="100px" Wrap="False" />
<ItemStyle Font-Bold="True" Font-Size="Small" />
</asp:BoundField>
                        
<asp:BoundField DataField="CTDESCRIPTION" HeaderText="Description:" SortExpression="CTDESCRIPTION">
<HeaderStyle BackColor="Navy" Font-Bold="True" Font-Size="Small" ForeColor="White"
HorizontalAlign="Right" Width="100px" />
<ItemStyle Font-Bold="True" Font-Size="Small" />
</asp:BoundField>
 
<asp:BoundField DataField="DISTSKU" HeaderText="NAED V/I:" SortExpression="DISTSKU">
<HeaderStyle BackColor="Navy" Font-Bold="True" Font-Size="Small" ForeColor="White"
HorizontalAlign="Right" Width="100px" Wrap="False" /
<ItemStyle Font-Bold="True" Font-Size="Small" />
</asp:BoundField>
                        
<asp:BoundField DataField="CTUM" HeaderText="Sold by:" SortExpression="CTUM">
<HeaderStyle BackColor="Navy" Font-Bold="True" Font-Size="Small" ForeColor="White"
HorizontalAlign="Right" Width="100px" Wrap="False" />
<ItemStyle Font-Bold="True" Font-Size="Small" />
</asp:BoundField>
                        
<asp:BoundField DataField="ShippedQtyPAM" HeaderText="In Stock:" SortExpression="ShippedQtyPAM">
<HeaderStyle BackColor="Navy" Font-Bold="True" Font-Size="Small" ForeColor="White"
HorizontalAlign="Right" Width="100px" Wrap="False" />
<ItemStyle Font-Bold="True" Font-Size="Small" />
</asp:BoundField>
 
<asp:BoundField DataField="CurrSellPricePAM" DataFormatString="{0:c} (Negotiated pricing, SPA and qty/breakpoint pricing available!)" HeaderText="List Price:"
HtmlEncode="False" SortExpression="CurrSellPricePAM">
<HeaderStyle BackColor="Navy" Font-Bold="True" Font-Size="Small" ForeColor="White"HorizontalAlign="Right" Width="100px" Wrap="False" />
<ItemStyle Font-Bold="True" Font-Size="Small" BackColor="Navy" ForeColor="Yellow" />
</asp:BoundField>
</Fields>
                    
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:DetailsView>
                    
&nbsp;&nbsp;<br />
&nbsp;&nbsp;
 
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/products_EMail.aspx?RecordID2=RecordID" Target="_self" Font-Bold="True" ForeColor="Navy" Enabled="False">Request a Quote for this Item...</asp:HyperLink></a>
</ContentTemplate>
            
</asp:UpdatePanel>
            
<br />
            
&nbsp;
        
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Font-Bold="True" Font-Names="Verdana" Font-Size="Small" ForeColor="Maroon" GridLines="None"
PageSize="1" ShowHeader="False" Style="position: absolute; left: 184px; top: 44px;"Width="88px">
 
<Columns>
<asp:BoundField DataField="norecs" NullDisplayText="Sorry...No records found matching the search string...)"
ReadOnly="True" ShowHeader="False" SortExpression="norecs">
<ItemStyle Font-Bold="True" Font-Size="Small" ForeColor="Maroon" />
</asp:BoundField>
</Columns>
</asp:GridView>
            
&nbsp;<br />
 
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:IDC_Receiving %>"
SelectCommand="SELECT CTMFGNAME, CTSTOCK, CTCATALOG, CTDESCRIPTION, DISTSKU, CTUM, COMMODITYNAME, RecordID FROM [Cooper-Master-Items-Table] WHERE (CTMFGNAME LIKE '%' + @CTCATALOG + '%') AND (IDCPROVIDERCODE = 'IDC001') OR (CTCATALOG LIKE '%' + @CTCATALOG + '%') AND (IDCPROVIDERCODE = 'IDC001') OR (CTDESCRIPTION LIKE '%' + @CTCATALOG + '%') AND (IDCPROVIDERCODE = 'IDC001') OR (DISTSKU LIKE '%' + @CTCATALOG + '%') AND (IDCPROVIDERCODE = 'IDC001') OR (COMMODITYNAME LIKE '%' + @CTCATALOG + '%') AND (IDCPROVIDERCODE = 'IDC001') ORDER BY RecordID" OnSelecting="SqlDataSource2_Selecting">
                
<SelectParameters>
<asp:ControlParameter ControlID="TextBox2" Name="CTCATALOG" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
 
&nbsp;&nbsp;<br />
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IDC_Receiving %>"
SelectCommand="SELECT COUNT('DISTINCT @CTCATALOG') AS norecs FROM [Cooper-Master-Items-Table] WHERE ((CTMFGNAME LIKE '%' + @CTCATALOG + '%') OR (CTCATALOG LIKE '%' + @CTCATALOG + '%') OR (CTDESCRIPTION LIKE '%' + @CTCATALOG + '%') OR (DISTSKU LIKE '%' + @CTCATALOG + '%') OR (COMMODITYNAME LIKE '%' + @CTCATALOG + '%')) AND (IDCPROVIDERCODE = 'IDC001')">
                
<SelectParameters>
<asp:ControlParameter ControlID="TextBox2" Name="CTCATALOG" PropertyName="Text" />
</SelectParameters>
            
</asp:SqlDataSource>
&nbsp;<br />
            
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:IDC_Receiving %>"
SelectCommand="SELECT [CTMFGNAME], [CTCATALOG], [CTDESCRIPTION], [DISTSKU], [CTUM], [ShippedQtyPAM], [CurrSellPricePAM] FROM [Cooper-Master-Items-Table] WHERE ([RecordID] = @RecordID)">
 
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="RecordID" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
 
</asp:SqlDataSource>
&nbsp;
</asp:Panel>
        
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div>
 
</form>
</body>
</html>

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-03-31 at 18:58:42ID23284583
Tags

Microsoft

,

VWD 2005

,

VB

Topic

Programming for ASP.NET

Participating Experts
1
Points
500
Comments
3

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Stock altert
    Hi; I am going to make a client tool for my customer using VB. This tool checks the stock index prijs every 2 min.. If the prijs is above or under a certain prijs, a popup window has been fired on the client computer to give a warning to the user. My customer prefers a serv...
  2. Enabling control in a GridView
    Hi, I'm using Visual Studio 2005, vb code: I have a gridview named "GrdLicenses" and I have a dropdown list ("Cbostates") inside the Grid, my grid also have a check box ("chksel"), what I need is to put enabled or disabled this dropdown list ever...
  3. Enable and disable checkbox in gridview
    Hello, I have a checkbox in a gridview that is set to disabled. I need to be able to enable it and then disable it. The gridview is in itemtemplate mode. This is how I attempt to enable the checkbox: Dim check As CheckBox = gvItems.FindControl("ckbEdited") ...
  4. Enable a button in gridview
    I have created a gridview with an additional command button. by default the command button is disabled. the gridview will have 2 important fields, ordered and received. The button is a confirm received button. So if the record already has a received datestamp the button sho...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: brwwigginsPosted on 2008-03-31 at 20:32:01ID: 21251044

I don't see the code for it but on the action that shows the detailsview add code to enable the request for quote link. Set the properties on the request for quote link to be disabled upon initial page load.

 

by: dmasiniPosted on 2008-04-03 at 12:01:02ID: 21275785

brwwiggins,

Hey...sorry I been MIA on this question!  So I re-read and scanned lots of 'possible' combinations on EE that could point me in the right direction PER YOUR SUGGESTION.

In the script area I needed to flag 2 events...the onpageload and user clicking on "Select" in the gridview1...so I tweaked it like this:

<script runat="server">
 '------------------------------ When Page Loads disable the Hyperlink by default ------------------------------
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
    Me.HyperLink1.Enabled = False
    End Sub
 
'------------------------------- If User selects a record in grid 1 then show the details ------------------------
'------------------------------- AND go ahead and enable the hyperlink                         ------------------------
    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
    Me.HyperLink1.NavigateUrl = "~/products_EMail.aspx?RecordID2=" & GridView1.DataKeys(GridView1.SelectedIndex).Value.ToString
    Me.HyperLink1.Enabled = True
    End Sub    
</script>

Saved and ran it...WORKS LIKE A CHARM!

Points to you and thanks again...

dm

 

by: dmasiniPosted on 2008-04-03 at 12:03:09ID: 31444686

brwwiggins - thanks again!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...