Category Archives: Troubleshooting

Interface with Multiple Base Interfaces

As you build interface hierarchies, in C# it is permissible to create an interface that derives multiple base interfaces. Example- public interface ICar { void Drive(); } public interface IUnderWaterCar { void Drive(); } //implementing an interface with two interfaces … Continue reading

Posted in C#, Knowledge Sharing, Troubleshooting | 5 Comments

Searching a string in SQL server 2005 -

It is very tedious to find out all Database objects (functions, stored procedures) containing a particular string. Here is the script to get it- DECLARE @Search varchar(255) SET @Search=’texttofind’ SELECT DISTINCT o.name AS Object_Name,o.type_desc FROM sys.sql_modules m INNER JOIN sys.objects o … Continue reading

Posted in Knowledge Sharing, SQL Server, Troubleshooting | 4 Comments

Searching a string in all tables in a Database

The following  Stored Procedure can help us to search for a string within all columns and rows of all tables in a Database. CREATE PROC SearchAllTables ( @SearchStr nvarchar(100) ) AS BEGIN CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630)) SET … Continue reading

Posted in Knowledge Sharing, SQL Server, Troubleshooting | 4 Comments

Silverlight – C# – How to set a XAML element’s style from code behind

XAMLelementName.Style = Application.Current.Resources["Style"] as Style; // If your style is defined in App.xaml Application.Resources section XAMLelementName.Style = this.Resources[StyleKey] as Style; // if your style is defined in Page.XAML UserControl.Resources section XAMLelementName.Style = button.Resources[StyleKey] as Style; // if your style is … Continue reading

Posted in C#, Knowledge Sharing, Silverlight, Troubleshooting | 2 Comments

Silverlight – C# – How to set XAML element’s margin from code behind

XAMLelementName.Margin = new Thickness(1, 2, 3, 4); // OR, if you need uniform thickness XAMLelementName.Margin = new Thickness(5);

Posted in C#, Knowledge Sharing, Silverlight, Troubleshooting | 3 Comments

Silverlight – Run Time Exception – Value does not fall within the expected range

If you are getting this error, you need to make sure that all xaml elements have unique names. Consider the following code snippets- for (int Count = 0; Count < StackPanel.Children.Count; Count++) { Chart ch = (Chart)StackPanel.Children[Count]; AnotherStackPanel.Children.Add(ch); } The … Continue reading

Posted in Knowledge Sharing, Silverlight, Troubleshooting | 2 Comments

How to associate XAP extension with Shell Zip application

To make it easier to unzip the XAP file of your application, you can associate the XAP extention with the Shell Zip application. To do this, run following command on command prompt- cmd /c assoc .xap=CompressedFolder

Posted in Knowledge Sharing, Silverlight, Troubleshooting | 4 Comments

Silverlight – What is inside a XAP file

XAP = dll(s) + AppManifest.xaml A XAP file is a combination of required DLLs and a AppManifest.xaml file compressed together and ZIP extention is changes to XAP. If you change the XAP extention back to ZIP, extract this ZIP file, … Continue reading

Posted in Knowledge Sharing, Silverlight, Troubleshooting | 5 Comments

Silverlight FAQs (Covers Silverlight 4)

Since last few month, i had been exploring Silverlight. So i decided to collect a few Interview Questions which could help someone somewhere. Please follow Silverlight Interview Quesrions (Covers Silverlight 4) link to read.

Posted in Knowledge Sharing, Silverlight, Troubleshooting | 3 Comments

WCF FAQs

Having working knowledge of a technology and clearing an interview are different. In this blog i will try creating collection of WCF interview questions and answers which could help someone clear WCF interview. Needless to say, working knowledge is must … Continue reading

Posted in Knowledge Sharing, Troubleshooting | 4 Comments