Now Deep Zoom in Asp.net (Seadragon control )

Monday, October 12, 2009



After Great success of silverlight Deep Zoom now Microsoft put this Feature in Asp.net With
Help of Ajax .nt now you can add Zoom ,Pan,Center Images in Asp.net with the help of Silverlight its called Seadragon . you can

  • Seadragon with a scalable overlay
  • Pan images
  • Zoom in
  • Zoom Out
  • Auto title
  • Fulpage mode

so Enjoy the World of Ajax.net



some Examples




Seadragon control with default properties
Click on the buttons to zoom in, zoom out, reset zoom, and make the image full screen. You also can drag the image with your mouse or double-click to zoom.
The Seadragon control is written in pure JavaScript. It works with all popular modern browsers.
Learn how to create images that work with the Seadragon control by visiting the Microsoft Live Labs website at http://livelabs.com/seadragon-ajax/.




Want to show Deep Zoom Images on your page? Try our Embed Builder. No download, no hassle.
It's easy to embed the Seadragon Ajax Viewer:
Use PhotoZoom. Just create a new album and upload your photo to it. Wait until it's done processing, then view an individual photo and copy the URL that appears at the bottom. Or, you could download Deep Zoom Composer to compose a Deep Zoom Image that you upload to your site.
Create the code for the viewer, below.
Copy the code into your web page or blog.

Type in the URL of the Deep Zoom Image you want to show:
This doesn't appear to be a valid Deep Zoom Image.
The URL submitted will not be retained by Microsoft, nor will it be used for any other purpose

C# 4.0 Dynamic Programming

Tuesday, October 6, 2009





C# 4.0 supports Dynamic Programming by introducing new Dynamic Typed Objects. The type of these objects is resolved at run-time instead of compile-time. A new keyword dynamic is introduced to declare dynamic typed object. The keyword tells the compiler that everything to do with the object, declared as dynamic, should be done dynamically at the run-time using Dynamic Language Runtime(DLR). Remember dynamic keyword is different from varkeyword. When we declare an object as var, it is resolved at compile-time whereas in case of dynamic the object type is dynamic and its resolved at run-time. Let’s do some coding to see advantage of Dynamic Typed Objects :)


A year back I wrote a code of setting property of an object using Reflection:


1: Assembly asmLib= Assembly.LoadFile(@"C:\temp\DemoClass\bin\Debug\DemoClass.dll");

2: Type demoClassType = asmLib.GetType("DemoClass.DemoClassLib");

3: object demoClassobj= Activator.CreateInstance(demoClassType);

4: PropertyInfo pInfo= demoClassType.GetProperty("Name");

5: pInfo.SetValue(demoClassobj, "Adil", null);

Notice line 3-5 creates instance of ‘demoClassType’ and set property ‘Name’ to ‘Adil’. Now with C# 4.0 line # 3-5 can be written as simple as:


dynamic dynamicDemoClassObj = Activator.CreateInstance(demoClassType);

dynamicDemoClassObj.Name = "Adil";

Simple isn’t it? Let’s see a slide from Anders Hejlsberg’s session at PDC 2008:




From the above slide, you can call method(s) such as x.ToString(), y.ToLower(), z.Add(1) etc and it will work smoothly :)


This feature is great and provides much flexibility for developers. In this post, we explore the dynamic typed object in C# 4.0. We will explore dynamic in detail and other features as well in the coming posts. Of course there are pros and cons of dynamic programming as well but where C# is going is something like having features of both static languages and dynamic languages.



dynamic d = 1;

var testSum = d + 3;

// Rest the mouse pointer over testSum in the following statement.

System.Console.WriteLine(testSum)


Conversions


Conversions between dynamic objects and other types are easy. This enables the developer to switch between dynamic and non-dynamic behavior.


Any object can be converted to dynamic type implicitly, as shown in the following example

C#

dynamic d1 = 7;

The dynamic language runtime (DLR) is a new API in .NET Framework 4 Beta 1. It provides the infrastructure that supports the dynamic type in C#, and also the implementation of dynamic programming languages such as IronPython and IronRuby. For more information about the DLR, see Dynamic Language Runtime

dynamic d2 = "a string";



The dynamic language runtime (DLR) is a new API in .NET Framework 4 Beta 1. It provides the infrastructure that supports the dynamic type in C#, and also the implementation of dynamic programming languages such as IronPython and IronRuby. For more information about the DLR, see Dynamic Language Runtime

dynamic d3 = System.DateTime.Today;

dynamic d4 = System.Diagnostics.Process.GetProcesses();

Microsoft DreamSpark for Students in Pakistan



Now Microsft introducing the best Gifts for student Call DreamSprak .DreamSpart is the Platform which will provide best opportunities specially for Pakistan we were lives in 3rd world country resources are alway matter for our student. On this issue Microsoft come`s like Farry God mother and this Program call the DREAMSPARK Deram comes true now Pakistan Student can development on world lastest Microsft technonogies with any fee and cost even a single peni and Learning Classes,Certification


its become`s free now just registartor , virifidd , download tree setp for sucessus by Microsoft so what are You waiting for go on Microsoft DreamSprak.com and get started millions of millions student were taking advantage of thisunbeliveable Offer by Microsoft for applying Microsft DreamSpark you just have Live Account and Select your country , find your Universit or Collage, school submit your identification information and download software online and get license key

List of Software


and enjoy and show the world what your dreams if you guys have any problem to find your Universities,Collages ,School so contact : contact Microsoft Student Partner at your University AND Contact Mic or Microsft led pakistanthank you

Copy Past Clipboard in ASP.net

Friday, October 2, 2009


Copy and Past in Asp.net With the help of javascript
its very easy by using Java Clipboard Function and Call from C# or Vb.net
and use it

for Copy
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "Copy", "clipboardData.setData('text', '" + TextBox1.Text + "');", True)


for past
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "Past", "document.getElementById('textbox2').focus(); ; PastedText = d

enjoy Aspnet Learn Free
by usama wahab khan
Download Source Code

Print GridView , Report Builder

Thursday, October 1, 2009

Download Source Code

Announcing the WebsiteSpark Program

Thursday, September 24, 2009


I’m excited to announce a new program – WebsiteSpark – that Microsoft is launching today.

WebsiteSpark is designed for independent web developers and web development companies that build web applications and web sites on behalf of others. It enables you to get software, support and business resources from Microsoft at no cost for three years, and enables you to expand your business and build great web solutions using ASP.NET, Silverlight, SharePoint and PHP, and the open source applications built on top of them.

What does the program provide?

WebSiteSpark provides software licenses that you can use for three years at no cost. Once enrolled, you can download and immediately use the following software from Microsoft:

  • 3 licenses of Visual Studio 2008 Professional Edition
  • 1 license of Expression Studio 3 (which includes Expression Blend, Sketchflow, and Web)
  • 2 licenses of Expression Web 3
  • 4 processor licenses of Windows Web Server 2008 R2
  • 4 processor licenses of SQL Server 2008 Web Edition
  • DotNetPanel control panel (enabling easy remote/hosted management of your servers)

The Windows Server and SQL Server licenses can be used for both development and production deployment. You can either self-host the servers on your own, or use the licenses with a hoster. WebsiteSpark makes it easy to find hosters who are also enrolled in the program, and who can use your licenses to provide you with either dedicated or virtual dedicated servers to host your sites on.

In addition to software, WebsiteSpark provides partner opportunities to grow and build your business (including customer referrals through our partner programs). It also includes product support (including 2 professional support incidents) and free online training for the products.

Who can join the program?

WebSiteSpark is available to independent web developers and small web development companies. The only two requirements to join the program are:

  1. Your company builds web sites and web application on behalf of others.
  2. Your company currently has less than 10 employees.

If you meet these requirements you can visit the WebsiteSpark website and sign-up today.

As part of the enrollment process you can pick either a network referral partner (for example: a hoster or an existing Microsoft partner), or enter a referral code that you have received at an event or from a Microsoft employee. If you send mail to webspark@microsoft.com you can get a referral code quickly. You can then use that code to enroll in the program on the WebsiteSpark website. Once enrolled you can immediately download and use the software, as well as begin to participate in the network/partner opportunities.

If you have any problems enrolling, you can also send me mail (scottgu@microsoft.com) and I can connect you with someone who can help.

What happens after the 3 years?

WebsiteSpark is a 3 year program. There is no obligation to continue to use any of the software after the three years is over, and there are no costs for the three years other than a $100 program fee at the end of the three years.

At the end of the three years, WebsiteSpark participants can optionally choose to purchase all of the software in the WebsiteSpark program via a $999/year package. This includes 3 copies of VS Professional, 1 copy of Expression Studio (including Blend and Sketchflow), 2 copies of Expression Web, and 4 processor licenses of Windows Web Server 2008 and 4 processor licenses of SQL Server Web edition that can be used for production deployment.

Alternatively, if you want to purchase only the production server licenses, you can take advantage of a $199/year offering that includes both 1 Windows Web Server processor license and 1 SQL Server Web edition processor license. You can buy the quantity you need of this package at $199/year each.

Summary

The WebsiteSpark program joins the other two successful “Spark” programs we’ve previously launched - BizSpark for startups, and DreamSpark for students.

Coming at a time when the current economic climate is still tough, WebsiteSpark will help support developers and companies by providing the business resources, training, and software necessary for companies to get started and grow successful businesses on the Microsoft Web Platform.

Visit www.microsoft.com/web to learn more about the Microsoft Web Platform, as well as download and install the new Microsoft Web Platform Installer V2 we released today – which makes it really easy to quickly provision web servers and web development machines. You can then browse and download and use open source web applications from the Windows Web Application Gallery.

Hope this helps,

Scott

P.S. In addition to blogging, I have been using Twitter more recently to-do quick posts and share links. You can follow me on Twitter at: http://www.twitter.com/scottgu (@scottgu is my twitter name)

Edit/Update/Delete Asp.net GridView Progammiclly

Saturday, September 19, 2009




Updating GridView in Asp.net 3.5 is Very Esey Let Do it
1: Program \Visual Studio 2008 and Create NewSite


2 Drag n Drop GridView on Form


3. Right Click on Gridview and Select Properties and in properties Window Select Event



4 double click on form and past on on load Event

if (IsPostBack != true)

{

OleDbDataAdapter da = new OleDbDataAdapter("Select * from MapLayers", cn);

DataSet ds = new DataSet();

da.Fill(ds);

GridView1.DataSource = ds.Tables[0];

GridView1.DataBind();

}

5 and on gridview updating event past this code

protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)

{

string layername = null;

string LayerId = null;

try

{

OleDbDataAdapter da = new OleDbDataAdapter("Select * from MapLayers", cn);

DataSet ds = new DataSet();

da.Fill(ds);

DataRow row = ds.Tables[0].NewRow();

row[0] = ((TextBox) GridView1.Rows[e.RowIndex].FindControl("Textbox1")).Text;

row[1]= ((Label)GridView1.Rows[e.RowIndex].FindControl("Label1")).Text;

ds.Tables[0].Rows[e.RowIndex][0] = row[0];

Response.Write(((TextBox)GridView1.Rows[e.RowIndex].FindControl("Textbox1")).Text.ToString());

OleDbCommandBuilder builder = new OleDbCommandBuilder(da);

da.Update(ds.GetChanges());

ds.AcceptChanges();

GridView1.EditIndex = -1;

GridView1.DataSource = ds.Tables[0];

GridView1.DataBind();

ClientScript.RegisterStartupScript(GetType(), "Message", "");

}

catch { }

}


6 add code on gridview Editing event

protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)

{

GridView1.EditIndex = e.NewEditIndex;

}

7 add code on gridview Deleting Event

protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)

{

OleDbDataAdapter da = new OleDbDataAdapter("Select * from MapLayers", cn);

DataSet ds = new DataSet();

da.Fill(ds);

DataRow row = ds.Tables[0].NewRow();

ds.Tables[0].Rows[e.RowIndex].Delete();

OleDbCommandBuilder builder = new OleDbCommandBuilder(da);

da.Update(ds.GetChanges());

ds.AcceptChanges();

GridView1.DataSource = ds.Tables[0];

GridView1.DataBind();

GridView1.EditIndex = -1;

//Reset Edit Index

ClientScript.RegisterStartupScript(GetType(), "Message", "");

}

8. Set GridView autogenerateColumns propertie to false

9 add to 3Colums in GridView

Column 1 CommandColumn

Column 2 boundfield

Column 3 boundfield

10 Covert Boundfeild Columns into TemplateField

11 have Fun run Application

thank

download Source Code

By Usama Wahab khan