B
ButlerDJIAM
I have pasted code I have in an ASPx page and I want to know how to make it
not display a field that is empty.
There does not seem to be anything online (MSDN) that explains it.
Usually the alt phone number would be empty and I do not want it displayed
Any suggestions would be appreciated.
<aspetailsView ID="DetailsView1" runat="server" AllowPaging="True"
AutoGenerateRows="False"
BorderColor="#336666" BorderStyle="Double" BorderWidth="3px"
Width="400px"
CellPadding="4" DataSourceID="SqlDataSource1"
GridLines="Horizontal" Height="50px"
HorizontalAlign="Center">
<FooterStyle BackColor="White" ForeColor="#333333" />
<EditRowStyle BackColor="#CCCC99" Font-Bold="True" ForeColor="#333333"
/>
<RowStyle BackColor="#CCCC99" ForeColor="#333333" />
<PagerStyle BackColor="#CCCC99" ForeColor="#333333"
HorizontalAlign="Center" />
<Fields>
<asp:BoundField DataField="Pastor" HeaderText="Pastor"
SortExpression="Pastor" />
<asp:BoundField DataField="Address" HeaderText="Address"
SortExpression="Address" />
<asp:BoundField DataField="CityStateZip" HeaderText="City State Zip"
SortExpression="CityStateZip" />
<asp:BoundField DataField="Phone1" HeaderText="Phone"
SortExpression="Phone1" />
<asp:BoundField DataField="Phone2" HeaderText="Alt Phone"
SortExpression="Phone2" />
<asp:BoundField DataField="FirstService" HeaderText="First Service"
SortExpression="FirstService" />
<asp:BoundField DataField="SecService" HeaderText="Second Service"
SortExpression="SecService" />
<asp:BoundField DataField="ThirdService" HeaderText="Third Service"
SortExpression="ThirdService" />
<asp:BoundField DataField="FourthService" HeaderText="Fourth Service"
SortExpression="FourthService" />
<asp:BoundField DataField="FifthService" HeaderText="Fifth Service"
SortExpression="FifthService" />
</Fields>
<HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
</aspetailsView>
Thanks in advance
Darrin
not display a field that is empty.
There does not seem to be anything online (MSDN) that explains it.
Usually the alt phone number would be empty and I do not want it displayed
Any suggestions would be appreciated.
<aspetailsView ID="DetailsView1" runat="server" AllowPaging="True"
AutoGenerateRows="False"
BorderColor="#336666" BorderStyle="Double" BorderWidth="3px"
Width="400px"
CellPadding="4" DataSourceID="SqlDataSource1"
GridLines="Horizontal" Height="50px"
HorizontalAlign="Center">
<FooterStyle BackColor="White" ForeColor="#333333" />
<EditRowStyle BackColor="#CCCC99" Font-Bold="True" ForeColor="#333333"
/>
<RowStyle BackColor="#CCCC99" ForeColor="#333333" />
<PagerStyle BackColor="#CCCC99" ForeColor="#333333"
HorizontalAlign="Center" />
<Fields>
<asp:BoundField DataField="Pastor" HeaderText="Pastor"
SortExpression="Pastor" />
<asp:BoundField DataField="Address" HeaderText="Address"
SortExpression="Address" />
<asp:BoundField DataField="CityStateZip" HeaderText="City State Zip"
SortExpression="CityStateZip" />
<asp:BoundField DataField="Phone1" HeaderText="Phone"
SortExpression="Phone1" />
<asp:BoundField DataField="Phone2" HeaderText="Alt Phone"
SortExpression="Phone2" />
<asp:BoundField DataField="FirstService" HeaderText="First Service"
SortExpression="FirstService" />
<asp:BoundField DataField="SecService" HeaderText="Second Service"
SortExpression="SecService" />
<asp:BoundField DataField="ThirdService" HeaderText="Third Service"
SortExpression="ThirdService" />
<asp:BoundField DataField="FourthService" HeaderText="Fourth Service"
SortExpression="FourthService" />
<asp:BoundField DataField="FifthService" HeaderText="Fifth Service"
SortExpression="FifthService" />
</Fields>
<HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
</aspetailsView>
Thanks in advance
Darrin