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

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

Is It Possible, And If So How, To Use "Placeholders" In A Resource String For Dynamic Information, S

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :.NET Framework

Does the ResourceManager class (or any class) support using “placeholders” in a resource string and then replacing the placeholders at runtime?  For example, let’s say I have a resource string of:


Hello <<<1>>>.  It’s <<<2>>>.


Does the ResourceManager class (or any class) support a way to replace <<<1>>> with the user name and <<<2>>> with the time at runtime?


I was thinking of writing a class derived from ResourceManager and then adding the following method:

View Complete Post

More Related Resource Links

How to send an email with information in query string


First I will say I googled (Binged to make Bill happy) for this but could not find anything, perhaps I am not stating what I need correctly;

I have a website that a customer creates orders (for a printing company) and after the order, I would like to email the customer a link to view the status of their order;

I need to send the CustomerID in the link so on the returning page if a CustomerID is detected in the querystring, I "auto login" the client and open the "Dashboard" for the order page for that customer.

Can anyone point me in the right direction as to how to send the link and how to parse the querystring to get the values from the link;

Thank you if you can point me in the right direction.

Failed to set image source with string resource

User can set image source property like this: <Image Source="pack://application:,,,/MyResource;component/Images/1.ico" /> I think the source string is a little bit longer, so I want to make it as string resource: <sys:String x:Key="StringSourceKey">pack://application:,,,/MyResource;component/Images/1.ico</sys:String> After define the string resource, I use it to set image source, like this: <Image Source="{StaticResource StringSourceKey}" /> But, this time, it failed. It doesn't work. I think it is a contert error. Anybody know what's wrong?  Or any method to make the resource uri path shorter? Thanks.

How to apply dynamic filter in Datasheet View from Query String

The datasheet view doesn't support either connections/dynamic filters from Query string. How to filter the data using query string?

Static and Dynamic Resources with Brush and Resource Dictionary

Hi, We're using a huge resource dicionary with all the styles and templates for our controls. Some of these are the images that we use for some buttons and icons in the application. As far as I know, Static and Dynamic resources have nothing to do with the ResourceDictionary and The Brush, i could use any of them, if i need the resource to load only when needed i could use dynamic and if i want it to load on initialization time i should use Static. But everytime i try to use a static resource to define a Fill of a rectangle my application crashes on initialization time (when it exectues the InitializeComponents). The resource i'm using is a DrawingBrush that is declared on my resource dictionary and the only way i could make it works is defining it as DynamicResource. What is the limitation? Its realy impossible to define a static resource on a fill property, and if its realy impossible, why?

dynamic sql string

I have a stored procedure that excepts a clause for my where clause. I can't figure out how to getit to work though. Please see my SQL code below. How do I attach DECLARE @Cand AS nvarchar(50)SET @Cost ='Total > 0' select * from dbo.Customer where (@Cost) This will not work either:select * from dbo.Customer where @Cost

Fetch specific information(string) from another website and display the same in my website


I am beginner and need help.

I want design a page where the end user enters information on my page and related information is fetched from the another website on my web page.

For example: Capturing City and state name from USPS.com

End user Task : Enter zipcode and click button 'Fetch' 

My page perform few task

1. opens usps site backend

2. Enters the zipcode

3. Captures city name and state as temporary value from the usps

4. Displays the same in labels present in my home page.

I need help and designing the same.

I need a dynamic connection string for my windows forms application.


Hello folks


I am brand new to forms applications and visual studio 2008 I am building a forms application to connect to a 3rd party's sdf file. There is no password or username required to connect however the 3rd party app installs the sdf in the users folder for me I am on windows 7 but I have clients on xp.


I went to add a data connection and chose sql ce file and browsed out to my location and it connects and works. But I need this connection string to be for whoever is logged into there laptops or computers no matter the operating system version xp,vista,7.


Data Source=C:\User\username\AppData\Roaming\PS\GES\surve.sdf


Can someone tell me how to do that. Also please explain in words a new borne could understand cause like I said I am new to this.


Thank you


Change Dynamic Data database connection string


I have recently started to learn Dynamic Data Web application.

I have built a Dynamic data Website with LINQ data access layer. When the LINQ data context was built over an existing SQL2005 database, the connection string for that database was correctly, automatically, placed into the Settings and .edmx Code for the project. It works, but it's a "static" connection string.

I would like to be able to use this one LINQ data access layer against both test and production databases without having to manually change and recompile the project's connection string each time.

Is there a way to pass/change the User connection string to the LINQ data access layer at Run Time so that destination database changes? Ot in Other words How can user can choose a database from a list of databases.


add string in existing resource file


hi there
i need to add a string in a existing resource file
i am trying this but does not work
do you know the problem?

Private Function AddString(ByVal file As String, ByVal result As String)
        Dim language As Google.API.Language = Google.API.Language.English

        Dim resxFilePath As String = file '"c:\files"  

        Using rr As New ResXResourceReader(resxFilePath)
            Dim outputFilePath As String = resxFilePath.Replace(".vb", "") & ".resx"

            Using rw As New ResXResourceWriter(outputFilePath)

                rw.AddResource(result, Replace(result, Chr(34), ""))


            End Using
        End Using

    End Function

resource string $Resources:ReportServerResources,DataSourceContentTypeName


I am getting this wierd error in sharepoint 2010 with a custom template, hep me out thank you

resource string $Resources:ReportServerResources,DataSourceContentTypeName

howto modify the url using (dynamic string) workflow



i have created a workflow .

i have created a variable in that variable i am passing the url of workspace.

The workspace url is like this https://ideaentityapacmicrosoftonlinecom-3.sharepoint.apac.microsoftonline.com/Sesha/default.aspx?InstanceID=1

I want to modify like this https://ideaentityapacmicrosoftonlinecom-3.sharepoint.apac.microsoftonline.com/Sesha/

ie;i want to capture upto that onlyafter that i want to add /Lists/Attendees/AllItems.aspx this after url .i am able to add this one but not able to deleted the instance id=1.after that i want to send mail to attendees.

Using EXECUTE on dynamic SQL string containing scalar valued function with parameters


I would like to use EXECUTE for calling a scalar valued function as dynamic SQL and for assigning the return value to a variable. This is working fine as long as the scalar valued function does not have parameters. E.g.:



@Result bit, @Function nvarchar(MAX)

Multiline Dynamic String Builder in SharePoint Workflow Designer

I am wanting to insert a newline or carriage return, or whatever, between two dynamic lookups inside the construct 'Dynamic String Builder'. Is this possible? The purpose of this activity in my sequential workflow is to append or concatenate the notes from each step into a multi-line string. I update the current notes into avariable called 'notesVariable', and then push it into a SP column called 'All Notes'. It works, but looks messy. Is this a bass-ackwards approach? Is there a 'best practice' that would look nicer?

SharePoint Designer 2007 People lookup in Dynamic String returns undesired value


Background: SharePoint 2007 servers with Site Collection Admin access, using SPD 2007.

While attempting to build email body and subject line text using Dynamic text action in a workflow, I can add a look-up to a field (defined as People/Groups) to return a value for the email text. While this does give that correct reference to the Person, the returned value is the Account value, not the Name value.

Example Text Returned: ...a new vaation request has been submitted by Domain\JSmith for your review and approval...

Desired Text Returned: ...a new vaation request has been submitted by John Smith for your review and approval...

In the People and Groups: User Information page it show the following fields:

Given that I can see that the standard built-in Task Notification emails used in SharePoint 2007 show the Name, not the Account, I'm wondering how/if I can do the same in my dynamic string look-up.

Looking at the XOML XML code I see the lookup, and I'm not disuaded by editng the code by hand (by opening as XML in SPD) instead of the using the SPD GUI for this.

Here's how the look-up is coded by the SPD GUI:

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Dynamic Data Templates in GridView ASP.NET 3.5

At a high level, Dynamic Data Templates can be seen as a system to very quickly build up a User Interface linked with the relevant data model, immediately enabling you to perform CRUD operations (Create, Read, Update, Delete) on the database using the specified data source. They provide a powerful method for building up these kinds of applications, and I'm going to focus on an overview of what Dynamic Data Templates actually are, and a few ways of customizing them to suit industry needs.

ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities

I did not play much with Dynamic Data controls in VS2008 and just made a cool discovery in VS2010 Beta 2. This may not even be new, but as I'm sitting 30,000+ feet over the Atlantic ocean, I don't have access to VS2008 at the moment to check.
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