.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

How to merge images runtime like this reference site

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


I have a requirement of achieving something like this site


When user select one particular image and apply change that should reflect in particular portion of the image.

For example when user select one picture of dinning room and ally different color of the wall. User selects different flooring type and that changes should be applied to the selected image.

Please help me out as soon as possible 

View Complete Post

More Related Resource Links

How to merge 3 separated color (Red, Green and Blue) saved as grayscale images images into colored i


Hi friends, I have separated Red, Green and Blue color from a bitmap image and stored it in grayscale (obviously).  Now I want to know how can I merge it so that I can get the exact previous colour, when I am merging them by reading its color values but it is giving  me grayscale image :( . Please help me out with some working sample code. Thanking in anticipation.

I am using the following code:

 public bool mergeToRGBandWriteBitmap(string sourceRFile, string sourceGFile, string sourceBFile, string targetFile)
            bool isSuccessfullywritten = false;
                Bitmap bitmapRed = (Bitmap)Image.FromFile(sourceRFile);
                Bitmap bitmapGreen = (Bitmap)Image.FromFile(sourceGFile);
                Bitmap bitmapBlue = (Bitmap)Image.FromFile(sourceBFile);
   Bitmap afterMerge = mergeRGB(bitmapRed, bitmapGreen

Problems with a .NET4 Control GAC Reference failing at runtime but fine during debugging

I believe this question is specific to the CLR how ever I will test this in a Forms Application later. I have multiple .Net 4 Targeted WPF Applications that Reference Non Microsoft .NET 4 WPF Controls that I can confirm are in the GAC. Everything Debugs Great (Noting that none of the references are copied to the output directory) and Install's well using a Setup Package and manually installing has the same effect even after a reboot. The problem is the application will not start even as an administrator as it does not find the Control References in the GAC. This also happens if I try to start the application manually in the visual studio output Directory. I can also confirm that opening the application in reflector that reflector is able to correctly find the references. Finally if I copy the controls (.dll's) to the location of the application everything runs as expected for all the above issues.   My question here is why is my application not able to load the .NET 4 controls from the GAC? Also note that everything uses a Strong Name.

Site Manager Error object reference error line 145 SiteManager.aspx SmtPostBackHandler1.UniqueID

Hi I am getting error bellow irrespective of if its IE or firefox Server Error in '/' Application. Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 143: Line 144: Line 145: <a onclick='javascript:__doPostBack("", "Refresh=<%= TreeView1.SelectedNode.Value %>")' style="cursor:pointer"> Line 146: <SharePoint:EncodedLiteral runat="server" text="<%$Resources:cms, SmtRefreshLink%>" EncodeMethod='HtmlEncode'/> Line 147: Source File: c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SiteManager.aspx Line: 145 Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.] Microsoft.SharePoint.Publishing.Internal.WebControls.ObjectSerializer.get_WebServerRelativeUrl() +148 Microsoft.SharePoint.Publishing.Internal.WebControls.ObjectSerializer.get_CachedList() +149 Microsoft.SharePoint.Publishing.Internal.WebControls.ObjectSerializer.get_AutomationId() +178 Microsoft.SharePoint.Publishing.Internal.WebContro

Using ScriptSrc to reference a javascript on publishing site breaks the Asset Picker dialog?


I'm using a site scoped feature to add a reference to jquery.js:


After activating the feature for a publishing site I no longer can insert a picture from Sharepoint. The Asset Picker dialog throws a script error when I select an image:

Line: 3377
Char: 5
Error: 'style' is null or not an object'
Code: 0
Url: http://www.mysitename.com/_layouts/1033/cmssitemanager.js 

My workaround is to add the .js reference directly in the masterpage instead, that does not affect the Asset picker. The error is easilly reproduced on my development server + a production server. I'm hoping anyone else has solved the issue because I would really like to use the cool ScriptSrc also for publishing sites.


Is it possible to determine at runtime when my site is running in the debugger?


Is it possible to determine at runtime when my site is running in the debugger?

I want to use one setting for production and another when I'm running in the debugger.

Unable to load current sub site's images from Sitecollectionimages folder


I am Unable to load current sub site's images from Sitecollectionimages folder

I have used the same master page all through the site for testing, I have used


I have resources Site, it works fine, Now I create a HR site under resources and Benefits sites under HR Site, I apply the same master page, my banner and footer images is not rendering, can someone please provide me a hint on how to point to the sitecollectionimages folder, is ../../ rightway to point to the folder or can i register a root and use that the pointing to the right folder.

I have a publishing site, It is on an vm, I am the admin for the site

Thank you


Site Theming? Where do put need to put images and StyleSheets....


Where do put need to put images and mycustom StylesSheets so that they are bundled into the SiteTemplate?

I'm theming a site locally and would like to deplloy it as a stie template but some of the files are natively stored where the 'Save as template' feature doesn't see them.


Pat in NH USA



Pat Tormey PE MVP Client App Dev

To merge aspnetdb with mydatabase to create one database that can be put on my hosting site

I want to create one database out of two databases in my  Dataengine on my server. The reason why is that my hosting site only allows one database of upto 100 mb as basic. I have aspnetdb which is generated by the Asp.net website Administration Tool and my database which is named bizonline I can not transfer two different databases to the hosting site. how can I transfer my working database and the database which is created by Asp.net website Administration tool to

Invoke WXF Service runtime without using SVCUTIL or addservice reference

Hi Guys,

I wanted to develop a wcf service and  i  wanted to invoke this wcf service in client application  by generating the proxy at runtime and use this proxy to incoke the methods of the WCF service. I have an idea how to develop wcf proxy  by using either SVCUtil.exe or Addservice Option in Visual studio. But My client wants to generate this proxy at runtime only as i have the service endpoint available to my client application .As I know the service Endpoint in my client applicatio( Like http://localhost/ HelloWcfservice/Service.svc)  ,now i have to use this service url and needs to generate the proxy class for this service and use this proxy to invoke the methods.

I got some basic info on this..is like this

As i have this Service URL ,I will get the Metadata of that service at runtime. and then from this Metadata i will generate a proxy and invoke the Methods of the service.  But i don't have any sample how i can do this .Can someone please help me with this how i can complete this task


SQL SErver 2008 Merge Replication: Alter Trigger cause syntax error on subscriber site


I have 2 clustered instances running on SQL Server 2008 SE-64 patch level 10.0.2531.0. These is one DB on these 2 instances (compatibility_level=80)under merge replication. now I need to change one trigger to add "NOT FOR REPLICATION". One publisher site all is ok but on subscriber site it causes Error 102 Severity 15 State 1 Incorrect Syntax near 'dbo'.

After tracing the error in profiler, I captured the incorrect syntax as below:

exec('ALTER TRIGGER [dbo].[trgBusinessEntityAllocationUpdate] on [dbo].[BusinessEntityAllocation] 

obviously, there is an duplicated part of object name. but the script was generated by replication engine. How could it happened? can anyone help?



George the DBA

Runtime error when open sharepoint site



I have problems. Could you help me out, please !

I set up my environment like this.

I'm running Windows XP Pro SP3 as client.

I used Microsoft Virtual Machine to install Windows Server 2003 sp2 and install MOSS 2007 on it as server.

I configured my server have two network adapter(my network card, and Microsoft loopback adapter)


Everything worked fine for the last couple of weeks until yesterday, when I enter Central Administration site on server, or normal site on client, it gave me an runtime error without any details of what went wrong.

Here is the error:


I tried to change the customError mode to 3 available value(on, off, remoteonly) in web.config file, but still the same.

I searched the web and none of them helped. Hope you guys help me with this.

And sometimes it gave me this error


Thank you in advance

Blog Site Lookup Field Changed List Reference


We have a OOB blog site that was working fine until last week. Overnight, the Category lookup field in the Posts list began referencing the Category list from another blog on a different, unrelated sub site. I'll try to illustrate the structure below.

Top Site
	Site A
		Sub Site A-1
			Sub Site A-1-1 (Blog 1)
	Site B
		Sub Site B-1 (Blog 2)

The Posts list in Blog 1 has a lookup field for Category, which now references the Category list from Blog 2--it should reference the Category list from Blog 1.

I came up with a solution to save the site as a template, alter the reference GUID in the manifest.xml, and then re-launch the site. However, this is not a perfect solution because:

  • Upon re-launch of the blog site, all comments and posts lose the previous Created and Modified By information and instead point to my account because I loaded the site. The only way I can think to circumvent this issue would be to modify the list reference while the site is still live, but I'm not sure how to do that.
  • I still don't know how this problem happened and how to avoid it in the future.

I've been researching the problem for several days and I can't find any rhyme or reason for how it may have occurred. I was hoping the community might have some ideas for me

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Take a tour of your SharePoint site

What is a SharePoint site for?
A SharePoint site is a Web site that provides a central storage and collaboration space for documents, information, and ideas. A SharePoint site is a tool for collaboration, just like a telephone is a tool for communication, or a meeting is a tool for decision making. A SharePoint site helps groups of people (whether work teams or social groups) share information and work together. For example, a SharePoint site can help you:

Coordinate projects, calendars, and schedules.
Discuss ideas and review documents or proposals.
Share information and keep in touch with other people.

Six easy ways to customize your site using Web Parts in SharePoint

Becoming familiar with Web Part customization techniques gives you a range of page-customization choices. For example, you can customize your site's home page so that it displays the specific information that your team needs. You can rearrange the list items on the home page, add lists, and even change the images on the home page. As you become more familiar with Web Part Page customization techniques, you can build interactive Web Part Pages that makes the data in lists more dynamic and useful, and you can add new Web Parts that provide access to external data and Web services.

A better way to reference your wizard steps using named steps

Note: this article uses the plain vanilla but the concepts apply equally well to its popular counterpart .

By far the most common way that I see wizard steps reference in code snippets is by their index.

Tips to Improve Your ASP.NET Web site performance

ASP.NET has been developed with lots of features which makes developer life easy. Start from ViewState, PostBack, Server Controls , User Controls and etc. All of them can make your web development experience fun and easy, but improper use of them can cause your site performance slowdown. Most of the controls generate overhead to the client and server. Therefore in this article, I I will list out about things you can do and don't to improve your ASP.NET website performance.
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