Hi,
using .net 2
sql server 2005
Here is my situation:
I'm passing a variable in the url from a selection on Page A and need
to display the results on the Results page be based on that variable
in the url. I would like that variable to trigger a stored and
display information in formView or Grid View. Whats the best way to
accomplish this?
Page A
This is passing var from grid view:
<asp:HyperLinkF ield DataTextField=" Open Issues"
DataNavigateUrl Fields="Ticket Number"
DataNavigateUrl FormatString="r esults2.aspx?{0 }" Target="_blank"
HeaderText="Ope n Issues" />
Results Page
<asp:FormView ID="FormView1" runat="server" DataKeyNames="T icket
Number"
DataSourceID="S qlDataSource1"
OnPageIndexChan ging="FormView1 _PageIndexChang ing">
<EditItemTempla te>
Ticket Number:
<asp:Label ID="Ticket_Numb erLabel1" runat="server"
Text='<%# Eval("[Ticket Number]") %>'>
</asp:Label><br />
Technician Assigned:
<asp:TextBox ID="Technician_ AssignedTextBox "
runat="server" Text='<%# Bind("[Technician Assigned]") %>'>
</asp:TextBox><br />
Issue Description:
<asp:TextBox ID="Issue_Descr iptionTextBox"
runat="server" Text='<%# Bind("[Issue Description]") %>'>
</asp:TextBox><br />
Open Date:
<asp:TextBox ID="Open_DateTe xtBox" runat="server"
Text='<%# Bind("[Open Date]") %>'>
</asp:TextBox><br />
Work Notes:
<asp:TextBox ID="Work_NotesT extBox" runat="server"
Text='<%# Bind("[Work Notes]") %>'>
</asp:TextBox><br />
<asp:LinkButt on ID="UpdateButto n" runat="server"
CausesValidatio n="True" CommandName="Up date"
Text="Update">
</asp:LinkButton>
<asp:LinkButt on ID="UpdateCance lButton"
runat="server" CausesValidatio n="False" CommandName="Ca ncel"
Text="Cancel">
</asp:LinkButton>
</EditItemTemplat e>
<InsertItemTemp late>
Ticket Number:
<asp:TextBox ID="Ticket_Numb erTextBox"
runat="server" Text='<%# Bind("[Ticket Number]") %>'>
</asp:TextBox><br />
Technician Assigned:
<asp:TextBox ID="Technician_ AssignedTextBox "
runat="server" Text='<%# Bind("[Technician Assigned]") %>'>
</asp:TextBox><br />
Issue Description:
<asp:TextBox ID="Issue_Descr iptionTextBox"
runat="server" Text='<%# Bind("[Issue Description]") %>'>
</asp:TextBox><br />
Open Date:
<asp:TextBox ID="Open_DateTe xtBox" runat="server"
Text='<%# Bind("[Open Date]") %>'>
</asp:TextBox><br />
Work Notes:
<asp:TextBox ID="Work_NotesT extBox" runat="server"
Text='<%# Bind("[Work Notes]") %>'>
</asp:TextBox><br />
<asp:LinkButt on ID="InsertButto n" runat="server"
CausesValidatio n="True" CommandName="In sert"
Text="Insert">
</asp:LinkButton>
<asp:LinkButt on ID="InsertCance lButton"
runat="server" CausesValidatio n="False" CommandName="Ca ncel"
Text="Cancel">
</asp:LinkButton>
</InsertItemTempl ate>
<ItemTemplate >
Ticket Number:
<asp:Label ID="Ticket_Numb erLabel" runat="server"
Text='<%# Eval("[Ticket Number]") %>'>
</asp:Label><br />
Technician Assigned:
<asp:Label ID="Technician_ AssignedLabel"
runat="server" Text='<%# Bind("[Technician Assigned]") %>'>
</asp:Label><br />
Issue Description:
<asp:Label ID="Issue_Descr iptionLabel"
runat="server" Text='<%# Bind("[Issue Description]") %>'>
</asp:Label><br />
Open Date:
<asp:Label ID="Open_DateLa bel" runat="server"
Text='<%# Bind("[Open Date]") %>'>
</asp:Label><br />
Work Notes:
<asp:Label ID="Work_NotesL abel" runat="server"
Text='<%# Bind("[Work Notes]") %>'>
</asp:Label><br />
</ItemTemplate>
</asp:FormView>