Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 3rd, 2008, 09:12 AM
Authorized User
 
Join Date: Sep 2005
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Default values when setting up an object data sour

There are times when I need to set a default value when configuring an object data source. I would prefer to use a symbolic constant instead of hardcodeing a value in the default value textbox.

For instance, with the object data source that I am currently working with I need to set a default value of "WHSE". Rather then hardcoding "WHSE" I would prefer to set the default value to something like: Globals.TypeCodes.Warehouse which is defined as:

public static class Globals
{
   public struct TypeCodes
   {
       public const string Warehouse = "WHSE";
   }
}

Is there a way that I can use Globals.TypeCodes.Warehouse instead of harding "WHSE" or is hardcoding an acceptable practice in the case?

Thanks

ps. I am aware that I can do this in the Selecting event of the object data source. I am hoping there is a way to do this by configuring the object data source.

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting default value in drop down. rupen Classic ASP Basics 4 July 3rd, 2014 03:00 AM
Setting Default values of DataGrid in C#2005 saxitalis C# 2005 0 August 15th, 2007 04:33 PM
setting default values prithvi28 XSLT 1 October 3rd, 2006 02:38 PM
How To Populate ListBox from a Secondary Data Sour luca ASP.NET 1.0 and 1.1 Basics 4 December 1st, 2004 05:24 PM
setting default month jtyson ASP.NET 1.0 and 1.1 Basics 1 June 30th, 2003 01:44 PM



All times are GMT -4. The time now is 02:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.