.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Interfaces and resource allocation

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :ASP.Net

I've recently been discussing Interfaces with a fellow developer. I don't have any experience using them, but my colleague has made some reasonable arguments for using them. He explained how it can allow you to limit the methods and properties in an object so you can instantiate an object for a specific purpose that may not need all the other methods and what not. The first question that came to my mind was "Does that also limit the amount of memory those objects use?" In other words, if I limit an objects methods/properties/etc does it only allocates memory for those specific methods/props? If so I see a lot of value in interfaces. I'm now in a scenario where I'd like to use an interface if it does restrict the amount of memory used. I'm rewriting some code another developer did a while back. He's using labels to store several values between postbacks. Ideally, I'd like to show an object holding those values into viewstate or session object. However, this particular object has a lot of methods and more properties than I need, so I don't want to throw a huge object into either of those objects. That said, if this interface would limit the amount of memory that object is going to grab a hold of, I'd feel much more comfortable storing that object then retrieving the 6 or 7 property values I need from the full blown object. Does this make sense? The

View Complete Post

More Related Resource Links

InterFaces and Abstract Classes

Link Describes About Abstraction and Interfaces In Breif

Printing resource files



I have some resource files for localization and would like to print them. When I try to print them in Visual Studio (with File -> Print...) the button is disabled. Does anyone know how to print them? (Without copying each into word or excel)

Thanks and regards,

set messageTemplateResourceName from resource file in Validation appication block.



  I am using Validation application block in my project and want to set validation message from resource file, but not able to do that. I tried giving the path of resource file in messageTemplateResourceType and name of resource in messageTemplateResourceName. But it did not help as I only receive the message if I have set something in messageTemplate even after setting the resource file.

Here is my code:

<validator lowerBound="1" lowerBoundType="Inclusive" upperBound="250"
              upperBoundType="Inclusive" negated="false" messageTemplate=""
              messageTemplateResourceType="Asurion.jCare.Common.Resources.UIResources.PerilTypeAndDetailsSection, Asurion.jCare.Common.Resources, Version=, Culture=neutral, PublicKeyToken=null"
              tag="" type="Microsoft.Practices.EnterpriseLibrary.Validation.Validators.StringLengthValidator, Microsoft.Practices.Enterpris

how to make a css style background image be linked to an image in the resource file


hey guy, i need help in a very troubling matter. I want to make a textbox with a specific style, within this style a set of images as background parts, how can i attach these images to the custom control as whenever i take the .dll file and add it to the toolbar the images do not appear. So i tried to make them as resource files and their property as embedded in .resx file, so how to make the css style background image url to be linked to any of those image.

thanks in advance

Page Title from Resource file...



I have Resource file...

I am using following code for Display Lable Text...

<asp:Label ID="lblName" runat="server" Text="<%$ Resources:resource,NAME %>"></asp:Label>

and I want to use that name for page title...

so I used "me.page.resources.resource.NAME" in code behind page.

 but I want to use that NAME in

<%@ Page Language="VB"

Problem in accessing resource file dynamically.


Steps I have followed are
1.I have created myres.en-GB.resx file at C:.
2.then created locale specific myres.en-GB.resources using resgen at c: only,
resgen c:\myres.en-GB.resx
3.Linked the Resource File to Assembly using AL.exe which is giving me assembly at c: only.
Al /t:lib /embed:myres.en-GB.resources /out:ClassLibrary1.dll
4.I have created one web application using vs 2008 & then build it.
5.Then placed both resource file & dll in web applications Bin\en-GB folder.
6.Anf finally written code at page load like
 CultureInfo info = new CultureInfo("en-GB");
            Thread.CurrentThread.CurrentCulture = info;
            Assembly asd = Assembly.Load("ClassLibrary1");
            ResourceManager res = new ResourceManager("myres.en-GB", asd.GetSatelliteAssembly(info));
            string sdf = res.GetString("Lab1");

but after running application I m getting following error
MissingManifestResourceException", "Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Cla

Can't read global resource in asp button


I have translated Text Ok in arabic and I have that placed in global Navig.resx file

<asp:Button ID

Thread Performance: Resource Contention Concurrency Profiling in Visual Studio 2010


Visual Studio 2010 includes new resource contention profiling features that help detect concurrency contention among threads. We walk through a profiling investigation to demonstrate how you can pinpoint and fix resource contention problems in your code.

Maxim Goldin

MSDN Magazine June 2010

Toolbox: User Interfaces, Podcasts, Object-Relational Mappings and More


This column covers common user interface groupings, configuring NHibernate using C#, and a look at interesting books and podcasts.

Scott Mitchell

MSDN Magazine October 2009

Cutting Edge: Build Rich User Interfaces with jQuery


In this month's installment we build modal and modeless dialog boxes in jQuery and explain how to post data from them to the Web server.

Dino Esposito

MSDN Magazine May 2009

Netting C++: Resource Cleanup


Last time Stan Lippman did not consider the visibility of types and nondeterministic finalization in writing his TQL wrapper code. This month he rewrites the code.

Stanley B. Lippman

MSDN Magazine August 2006

{ End Bracket }: Building Voice User Interfaces


The GUI is the interface of choice for scenarios when the user has a large keyboard, mouse, and display. But most cell phones have just a keypad and a small display. Drivers want to get directions without taking their eyes off the road or their hands off the wheel.

Alex Acero

MSDN Magazine February 2006

Can't Commit?: Volatile Resource Managers in .NET Bring Transactions to the Common Type


Here Juval Lowy discusses the benefits you'll get when you implement transactions in your non-database applications, with a little help from volatile resource managers in the .NET Framework 2.0.

Juval Lowy

MSDN Magazine December 2005

Resource File: Microsoft Newsgroups for Developers


Microsoft offers more than 1,900 public and 500 private newsgroups that cover all aspects of Microsoft products and technologies. An individual newsgroup might get up to 15,000 postings per month, with developers answering customer questions, asking about specific product features, and getting product feedback.

MSDN Magazine May 2004

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend