How to load multiple silverlight elements on one page?

Hi all. Recently I have started learning and working silverlight. Here I am not explaining what it is as this you might get anywhere. Anyway’s lets consider that we know how to load silverlight element on page, but what if I want to load more then one. Here it is how.

We must be knowing that there is a respective file for its html file named TestPage.html.js in which there is a method called “createSilverlight”. I have just renamed it to “createSilverlightEx”. Now to load silverlight element it needs one xaml page, a parentid where it needs to load and one elementid which is a unique id for all loaded silverlight controls.

Besides writing method “createSilverlight” again and again to create various silverlight elements, just have 3 params in “createSilverlightEx” method. Hence it will create controls as many depends on params.

function createSilverlightEx(xamlFile, parentID, elemID)

{
    Silverlight.createObjectEx({
        source: xamlFile, // 1st PARAM
        parentElement: document.getElementById(parentID), // 2nd PARAM
        id: elemID, // 3rd PARAM
        properties: {
            width: “700″,
            height: “150″,
            version: “1.1″,
            enableHtmlAccess: “true”
        },
        events: {}
    });

}

Leave a Comment

Optimize your Visual Studio 2005 IDE

  1. Go to Tools | Options.In Environment | Startup section, change At startup setting to Show empty environment.
  2. Disable splash screen. Add the parameter /nosplash to the Visual Studio 2005 .exe target.
  3. Turn off animation. Go to Tools | Options | Environment and uncheck Animate environment tools.

Leave a Comment

Read Receipt – ASP.NET 2.0 Email.

Hi Friends, you must be sending emails through ASP.NET 2.0 built in classes. But do you know, you can have its read receipt besides setting its priority and Reply To. Hmmm lemme tell you how …

 

First of all you must have MailMessage object. Through that you have to set its header. Here it is how .

Dim oMailMessage As New MailMessage(fromEmail, toEmail)
oMailMessage.Headers.Add("Disposition-Notification-To", sendReadReceiptEmail)

where, Disposition-Notification-To is a header.

Comments (3)

Use XML in stored procedure

Sometimes it is needed to pass comma separated values to sp and then we extract it. But instead of that we can pass a xml string to sp and convert it to temp table. Here is how :

 

In DAL :

string XMLEntityIDS = “<Root>”;
foreach (int Entity in lstNewEntities)
{
      XMLEntityIDS += “<EntityIDS EntityID=\”" + Entity.ToString() + “\” ></EntityIDS>”;
}
XMLEntityIDS += “</Root>”;
db.AddInParameter(cmdUpdateOrder, “@EntityIDs”, DbType.String, XMLEntityIDS);

 

In SP :

DECLARE @docHandle int    
EXEC sp_xml_preparedocument @docHandle OUTPUT, @EntityIDs 
SELECT * Into #TempEntities FROM OPENXML(@docHandle, N’/Root/EntityIDS’) WITH (EntityID int)

:)

Comments (1)

No More Cell/other gadgets Thief :)

Leave a Comment

.htaccess Editor

We all use .htaccess file for various purposes like URL redirecting, Rewriting the URLs etc. If you do a small mistake in writing rules for this file your entire site becomes unavailable to the visitors and shows 500 Internal server error.

For those of you who don’t know how to edit .htaccess file there is an online tool where you can create code for .htaccess rules for your blog or website.

Editor : http://www.htaccesseditor.com/en.shtml
Source
: http://www.teknobites.com/2007/09/02/htaccess-editor/

Leave a Comment

‘B’ for Blinq

It seems like season of linq. These days I am learning Linq whenever I get time. Blinq is an asp.net website generator tool developed by Polita Paulus. It will create code written in Linq. So in short you need not to know Linq. Seems like these guys wont allow us to learn new stuffs :) .  kidding ……

Download your copy from : http://www.asp.net/downloads/teamprojects/default.aspx?tabid=62

You have to just point it to database like in below image  :

cmd

Leave a Comment

How to know which framework version is installed ?

Search for MSCorEE.dll file in the %SystemRoot%\system32 directory. If exists that means framework is installed. Now if you wanna know which framework version is installed, simply write “clrver” command in visual studio command prompt. It will list out all versions installed in your system.

Leave a Comment

Refactor 2.2 for ASP.NET

Refactor! is freely available to all ASP.NET 2.0 developers and offers a comprehensive suite of tools that enable you and your team to simplify and shape complex code and HTML markup – making your web applications easier to read and less costly to maintain.

Demo Images : http://www.doitwith.net/2007/05/07/PowerfulFreeDownloadRefactor!ForASP.NET2.2.aspx

Leave a Comment

What is WPF – Windows Presentation Foundation.

Windows Presentation Foundation (WPF) is the answer for software developers and graphic designers who want to create modern user experiences without having to master several difficult technologies.  WPF aims to combine the best attributes of systems such as DirectX (3D and hardware acceleration), Windows Forms (developer productivity), Adobe Flash (powerful animation support), and HTML (declarative markup and easy deployment).  WPF is a major component of the .NET Framework, starting with version 3.0. (This is why the first version of WPF carries a 3.0 version number rather than 1.0!)

Leave a Comment

« Newer Posts · Older Posts »