473,785 Members | 2,919 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DetailsView ASP Control and an empty field not an empty record.

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.

<asp:DetailsVie w ID="DetailsView 1" runat="server" AllowPaging="Tr ue"
AutoGenerateRow s="False"
BorderColor="#3 36666" BorderStyle="Do uble" BorderWidth="3p x"
Width="400px"
CellPadding="4" DataSourceID="S qlDataSource1"
GridLines="Hori zontal" Height="50px"
HorizontalAlign ="Center">
<FooterStyle BackColor="Whit e" ForeColor="#333 333" />
<EditRowStyle BackColor="#CCC C99" Font-Bold="True" ForeColor="#333 333"
/>
<RowStyle BackColor="#CCC C99" ForeColor="#333 333" />
<PagerStyle BackColor="#CCC C99" ForeColor="#333 333"
HorizontalAlign ="Center" />
<Fields>
<asp:BoundFie ld DataField="Past or" HeaderText="Pas tor"
SortExpression= "Pastor" />
<asp:BoundFie ld DataField="Addr ess" HeaderText="Add ress"
SortExpression= "Address" />
<asp:BoundFie ld DataField="City StateZip" HeaderText="Cit y State Zip"
SortExpression= "CityStateZ ip" />
<asp:BoundFie ld DataField="Phon e1" HeaderText="Pho ne"
SortExpression= "Phone1" />
<asp:BoundFie ld DataField="Phon e2" HeaderText="Alt Phone"
SortExpression= "Phone2" />
<asp:BoundFie ld DataField="Firs tService" HeaderText="Fir st Service"
SortExpression= "FirstServi ce" />
<asp:BoundFie ld DataField="SecS ervice" HeaderText="Sec ond Service"
SortExpression= "SecService " />
<asp:BoundFie ld DataField="Thir dService" HeaderText="Thi rd Service"
SortExpression= "ThirdServi ce" />
<asp:BoundFie ld DataField="Four thService" HeaderText="Fou rth Service"
SortExpression= "FourthServ ice" />
<asp:BoundFie ld DataField="Fift hService" HeaderText="Fif th Service"
SortExpression= "FifthServi ce" />
</Fields>
<HeaderStyle BackColor="#336 666" Font-Bold="True" ForeColor="Whit e" />
</asp:DetailsView >

Thanks in advance
Darrin

Nov 9 '06 #1
0 1172

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1902
by: TdarTdar | last post by:
HI, I have a asp 2.0 page that has a sqldatasource and a detailsview i have enabled the inserting updating deleting in the datasoure. I have a blank table that has no records. I run the page.. I get a blank page how can I toggle the detailsview to show the new insert form if it has no records returned? So I can insert the very first record into the system.
1
10073
by: Shawn Wildermuth | last post by:
I have a *single* SqlDataSource that loads up a single result set that I show in a GridView. In the GridView, i've added a "Select" button and handling the SelectedItem event. I also have a DetailsView (though FormView has this same issue) where I want to be able to set the current item to bind to from the DataSource. All the examples I've seen use two data sources and on every *select* they do another round-trip to the Database (which...
12
8706
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press update after making changes, but I don't want that update button. How can I get the updated object when the user presses one of my other action buttons?
3
3129
by: stuart.d.jones | last post by:
Hi, I have a DetailsView control bound to a SqlDataSource. I've got everything working nearly as I want, but here's my problem. I have a table which has a Guid as a Primary Key, and a VarChar field (a Title) which is also unique. If the user edits the Title field in the DetailsView to make it a duplicate, and hits Update, an exception is thrown (SQLException - statement cancelled as it would violate the key restrictions).
0
1248
by: Seok Bee | last post by:
Dear Experts, In my web application, I have a Master/Detail display of records using Gridview and DetailsView controls. Whenever, I made a selection of a record from the Gridview control, the detail information of the record will be displayed in the DetailsView control. Information in the editable in the detailsview by allowing user to have the edit option. On top of that I also allow user to add new record through the detailsview...
0
1874
by: jeffmagill | last post by:
Hi Everybody, I'm really hoping that someone can help me out because I have spent too much time on this project already! Basically, I have a DetailsView that handles all the Edits for a GridView - each row has an edit button and clicking on this should trigger that record to be loaded into the DetailsView for editing. The problem is that the record never gets loaded into the DetailsView. Instead, the DetailsView always and only...
1
3699
by: JayD | last post by:
Here is the problem: Using asp.net 2.0 to create a web app with standard master table gridview and child detailsview with insert capability. SQL Server 2000 database on the backend. Using Visual Web Developer for front-end development. I want to insert new records in detailsview based on selected gridview record. All the fields in "INSERT" mode are blank, which is okay EXCEPT that I want the child ID to be that of the selected...
2
5511
by: makennedy | last post by:
Hi Experts, Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere. Basically I have a TreeView Control which I have created programmatically. And I want to bind the selection of a TreeNode (which is a record) from the database) to a DetailsView which shows the datatable record for the selected TreeView node in the Details View. I am using IDE : Visual Web Developer 2005 Express; OS=...
5
3466
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration: default.aspx:
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10087
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.