I am using the QueryStringParameter to pass a parameter in the SELECT statement to display only the necessary data on the page from SQL Server.
<SelectParameters>
<asp:QueryStringParameter Name="doc_family" QueryStringField="doc_family" Type="String" />
</SelectParameters>
I was wondering what if I could take advantage of the QueryStringParameter and write some IF statements to add custom headings as per data fetched on the page instead of one generic one. As an example:
Here is the code snipped for the ASP label control wrapped in H1 tag:
<h1 style="color:Black;">
<asp:Label ID="DocumentNameLabel" runat="server" Text="Hello World" />
</h1>
My project is written in C# and the QueryStringParameter is used in this format in the URL ~/ProceduresForms.aspx?doc_family=CR.
Any help is appreciate.
In Page_Load:
if(Request.QueryString["doc_family"] == "CR") DocumentNameLabel.Text = "CleanRoom";
You should be able to take it from there?