N
Nate Hekman
I've got an AccessDataSource configured to return a single record. I've
bound that to a FormView. Beautiful, right out of the box I get a simple
tabular display of all the fields in that record. But now I want to make
that output look nicer, and I'm running into trouble.
The record I'm displaying is a Knowledge Base article, and it has fields
such as Symptoms, Cause, and Resolution. I need to display a title,
"Symptoms", followed by the Symptoms field. But if the field is blank, I
don't want to display the title. How can I incorporate that "if" logic in a
FormView's ItemTemplate?
Two dead ends I tried were:
1) Put the title and field in an aspanel, with Visible='<%#
Bind("Symptoms") == "" %>' or something along those lines. But apparently
we can't put logical operators in the <%# %>. (Where is the <%# syntax
described anyway? You can't do a google search for that!)
2) Code something up in the page's OnLoad(), something like: if
(AccessDataSource1["Symptoms"] == "") SymptomsPanel.Visible = false; But I
can't figure out how to get from an AccessDataSource to the DataSet it got
back from its select query. What am I missing?
Any help appreciated. Thanks.
Nate
bound that to a FormView. Beautiful, right out of the box I get a simple
tabular display of all the fields in that record. But now I want to make
that output look nicer, and I'm running into trouble.
The record I'm displaying is a Knowledge Base article, and it has fields
such as Symptoms, Cause, and Resolution. I need to display a title,
"Symptoms", followed by the Symptoms field. But if the field is blank, I
don't want to display the title. How can I incorporate that "if" logic in a
FormView's ItemTemplate?
Two dead ends I tried were:
1) Put the title and field in an aspanel, with Visible='<%#
Bind("Symptoms") == "" %>' or something along those lines. But apparently
we can't put logical operators in the <%# %>. (Where is the <%# syntax
described anyway? You can't do a google search for that!)
2) Code something up in the page's OnLoad(), something like: if
(AccessDataSource1["Symptoms"] == "") SymptomsPanel.Visible = false; But I
can't figure out how to get from an AccessDataSource to the DataSet it got
back from its select query. What am I missing?
Any help appreciated. Thanks.
Nate