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:
- If (doc_family = CR) then display "Clean Room" on the page
- If (doc_family = QA) then display "Quality Assurance" on the page
- If (doc_family = TP) then display "Test Protocol" on the page
- Else "Page name is not available"
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:
You should be able to take it from there?