Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / July 2005

Tip: Looking for answers? Try searching our database.

Default values in Reference.cs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Scott - 06 Jul 2005 21:14 GMT
I want to be able to set some default values in my web application
...like..setting all strings to "" and all integers to int.MinValue....etc...

I have a web application object that is based on a web service class.  When
I create this new object in the application

MyClass cls = new MyClass();

it creates the object without any problems, but all of the objects
attributes are null....I found that I can acutally set the web application
objects default values by just opening up my Reference.cs file and put in
those default values, but as soon as I make any changes to my web service and
update the references...all of those default values get blown away...is there
any way that visual studio will allow you to set default values for your web
service references??

Thanks in advance!!

John Scott.
jabailo@texeme.com - 06 Jul 2005 21:28 GMT
> I want to be able to set some default values in my web application
> ...like..setting all strings to "" and all integers to int.MinValue....etc...

Cant you do that in the Init method?

> I have a web application object that is based on a web service class.  When
> I create this new object in the application
[quoted text clipped - 12 lines]
>
> John Scott.
John Scott - 06 Jul 2005 21:38 GMT
There is no Init medthod in the Reference.cs file...the Reference.cs is for
the Reference.map file under the Web Refernces folder in Soluction
Explorer...it is for mapping web application objects based on webservice
classes...I could create a GetNewOjbect webservice method...in which I could
send back a populated object with default values...but I want to try and make
as few calls to the webservice as possible and let the application do most of
the work.

Thanks for the reply though.

John Scott.

> > I want to be able to set some default values in my web application
> > ...like..setting all strings to "" and all integers to int.MinValue....etc...
[quoted text clipped - 17 lines]
> >
> > John Scott.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.