CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 1/9/2007 7:22:23 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 45 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
rhyssleary
Asp.Net User
HELP! Stopping DropDownList ListItem Value="" from disappearing on Design View change in VS20051/9/2007 7:22:23 PM

0/0

Hello Everyone,

I have been limping along trying to ignore this little bug until I can't ignore it any more.  I'm hoping somebody knows how to disable this "feature" from VS2005, so I can reclaim some of my prescious little sanity.

PROBLEM:
VS2005 reformats my DROPDOWNLIST LISTITEM whenever there is a VALUE="" whenever I make changes to that control in Design View. 
I want to keep that VALUE="", because it represents NULL to me.  There must be a way in VS2005 to prevent this auto-correction, but I have not been able to find it.

Before:
 

 *** Some change made in Design View ***
After:
 <asp:DropDownList ID="ddJobsite_Status" runat="server" SelectedValue='<%# Bind("jobsite_active") %>'>
     <asp:ListItem Selected="True">- Unknown -</asp:ListItem>  <--- *** Notice the missing Value="" tags
     <asp:ListItem Value="0">On-going</asp:ListItem>
     <asp:ListItem Value="1">Completed</asp:ListItem>
     <asp:ListItem Value="2">On-Hold</asp:ListItem>
 </asp:DropDownList>

STEPS TO REPRODUCE PROBLEM:
1) In a web page, add a DROPDOWNLIST control
2) In Source View add a LISTITEM with a VALUE=""
3) Switch to Design View.
4) Select the DROPDOWNLIST and change any property value other than ID
5) Switch back to HTML View and the VALUE="" is now missing.

ENVIRONMENT:

O/S: Windows XP Professional 2002 SP2
Web Browser: IE6 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
Type of Application: Website Project

Programming Language: VB.NET

Microsoft Visual Studio 2005 Professional
Version 8.0.50727.42  (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB925674)  
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU. \n
If you later install a more recent service pack, this Security Update will be uninstalled automatically. \n
For more information, visit http://support.microsoft.com/kb/925674

SQL Server Reporting Services  
Microsoft SQL Server Reporting Services Designers
Version 9.00.2047.00

 

Mikhail Arkhipo
Asp.Net User
Re: HELP! Stopping DropDownList ListItem Value="" from disappearing on Design View change in VS20051/10/2007 8:13:16 AM

0/0

There is no way to avoid this, this is not a feature and hence cannot be really turned off, sorry The problem is that some controls do not distinguigh between no attribute and empty attribute cases. Both look the same. Therefore control may not persist the attribute back after editing. Workaround is to use some value like -1 to represent 'not selected'.

Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

...
Lance Spence Under Target Framework, change it from .NET Framework 2.0 to .NET Framework 3.5. ..... 91K+
...
ASP.NET Development Jun 10, 2006 ... Net, Cascading DropDown List in Detail View...Please help ... Q: How to VS 2005 .vb > dll ... Change value of DataGrid columns (2) ...
CodeProject: An OwnerDraw ComboBox with CheckBoxes in the Drop ... The next step was to define a class to contain our drop-down list item .... box and the column would immediately appear, uncheck it and it would disappear). ...
Matt Dotson's .NET Tips & Tricks : Real World GridView: Bulk Editing For the bulk edit data grid view, is there a way that the user selectes the ...... I've got checkboxes in the gridview which I have to change the values ...

Web:
CodeProject: Quickly add reports to your website. Free source code ... NET2003, VS2005, SQL Server, Visual Studio, Design, Architect, DBA, Dev ..... to Page_Init will help by stopping it from re-initialising the ...
TheMSsForum.com >> Asp >> Multiple ListSearchExtender problems ... I have a FormView with several DropDownList controls that are bound to ..... < asp:ListItem Value="L3">List3 And in the code ...
TheMSsForum.com >> Asp >> Closing a window from code behind - The ... I am using vs2005 and web application projects to do this. .... I added an option to the DropDownList to choose <> with a value of -1. ...
.NET ASP Page 31 - Bytes Site Map Programmatically changing value of a control within a template · Application lock state during ... How to stop VS2005 IDE to complain about missing files ! ...
.NET ASP Page 45 - Bytes Site Map Inherited Properties for a value object not bindable in a datagrid · Get DropDownList To Rebind On Inserting A Record In GridView · Can't select label text ...
Learning ASP.NET 3.5 | O'Reilly Media In Design view, drag a standard ASP.NET Panel control (not an AJAX ... Connecticut




Search This Site:










please help how to call stored procedure from asp.net code

custom login

html in outlook is messed up

how to use a selected item from a dropdownlist in a sqlcommand

"service unavailable " error in windows server 2003 r2 sharepoint server

<list> ??? there on varibles,methods, class... im clueless???

the problem about static function and static property

string stote in variable subject in mail page

can load index.htm remotely and locally, and default.aspx locally, but not remotely.

how can i use parameters in a url?

how to get a certain value

mailing list

security

parser error within @page directive - on initial web project creation

saving a file on the client

reading ascii text / convert to utf8 (problem)

user sign up

ret variable

server.htmldecode........

debug tracing

setting look of item in dropdown, depending on db value ?

image maps

asp.net version 1.1

getting started

i'm sorry for this silly question...converting system.web.ui.webcontrols.unit to integer ?

visual studio .net 2003 professional

please help w/ .js error

msgbox ?

declaring messagebox

default enter key

  Privacy | Contact Us
All Times Are GMT