Friday, June 22, 2012
Parse and TryParse
This function will take a string and convert it and then return the integer.
It will throw FormatException if it cant parse
Throw OverflowException if it is too large
Throw ArgumentException if it is null value
TryParse
This wont throw any exception. It returns a boolean if it was able to successfully parse a number
ex., int.Tryparse(string, out result).
Data Controls
Monday, March 29, 2010
WebServer and ApplicationServer
Web servers are computers on the Internet that host websites, serving pages to viewers upon request.
A Web server handles the HTTP protocol. When the Web server receives an HTTP request it responds with an HTTP response such as sending back an HTML page.
Webserver is designed for Website deployments and web based apps.
APPLICATION SERVER:
Application server is a server that provides XML web Services, WEb Applications and distributed apps.
An application Server exposes business logic to client applications through various protocols possibly including HTTP.
Application Server is used to Deploy an Application and then that application can be accessed using webserver.
The difference between WebServer and ApplicationServer is
1. Web Server serves static HTML pages or gifs, jpegs, etc.,
An Application Server is used to run business logic or dynamically generated presentation code.
2. A Web Server understands and supports only HTTP protocol, an Application Server supports HTTP,TCP/IP and many more protocols.
3. Application Server will take care of all these issues like Security Transaction Multithreading Resource pooling etc...
In Web Server it is not possible...
PROTOCOLS
FTP (File Transfer Protocol) is a standard network protocol used to exchange and manipulate files over a TCP/IP-based network, such as the Internet
SMTP(Simple Mail Transfer Protocol) stands for simple mail transfer protocol.
POP3(Post Office Protocol) is an acronym Post Office Protocol.
The difference is POP is a protocol for storage of email. SMTP is a protocol for sending and receiving.
Friday, March 26, 2010
ASP.Net Page Life Cycle
The general Page Life Cycle Stages are:
1. Page request - Here Page is requested by the user.
2. Start – Sets the properties such as Request, Response, IsPostBack and UICulture.
3. Page initialization - Controls on the page are available and each control's UniqueID property is set.
4. Load – Controls are loaded here if it is a PostBack request.
5. Validation – Sets the IsValid property.
6. Postback Event handling – Event handlers will be called if it is PostBack.
6. Rendering - the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream of the page's Response property.
7. Unload - Unload is called after the page has been fully rendered, sent to the client, and is ready to be discarded.
Common life cycle Events:
1. PreInit – Start event of the Page life cycle and here every page controls are initialized.
2. Init – This is used to read or initialize control properties.
3. InitComplete – Used for processing tasks that require all initialization be complete.
4. PreLoad - This is used before Perform any processing that should occur before Load.
5. Load - Use the OnLoad event method to set properties in controls and establish database connections.
6. Control Event - These are control specific events such as – Button Click, DropDownIndexChanged etc.
7. Load Complete - This event is used for performing those tasks which require load has been completed.
8. PreRender - In this event page insures that all child controls are created.
9. SaveStateComplete - This event occurs after viewstate encoded and saved for the page and for all controls.
10. Render – This is not an event. The page instance calls this method to output the control’s markup, after this event any changes to the page or controls are ignored.
11. Unload – Nothing but cleanup task like closing the files, database connections etc.,
This table shows stages and corresponding Events
Stage Events/Method
Initialization of the page Page_Init
Loading of the View State LoadViewState
processing of the Post back data LoadPostData
Loading of Page Page_Load
Notification of PostBack RaisePostDataChangedEvent
Handling of PostBack Event RaisePostBackEvent
Pre Rendering of Page Page_PreRender
Saving of view state SaveViewState
Rendering of Page Page_Render
Unloading of the Page Page_UnLoad
Friday, January 15, 2010
CSS/JAVASCRIPT TECHNIQUES
http://www.smashingmagazine.com/2010/01/12/45-powerful-css-javascript-techniques/
go thro' the link and enjoy
Friday, July 10, 2009
Silverlight websites
Studio 2008:
Ordinary HTML web site: In this case, the entry point to your Silverlight application is a basic HTML file that includes a Silverlight content region.
ASP.NET web site: In this case, Visual Studio creates two projects?one to contain the Silverlight application files, and one to hold the server-side ASP.NET web site that will be deployed alongside your Silverlight files.
The entry point to your Silverlight application can be an ordinary HTML file or an ASP.NET web form that also includes server-generated content.
No matter which option you choose, your Silverlight application will run the same way,the client browser will receive an HTML web page, that HTML page will include a Silverlight content region, and the Silverlight
code will run on the local computer, not the web server.
However, the ASP.NET web approach makes it easier to mix ASP.NET and Silverlight content.
Friday, June 19, 2009
Wednesday, June 10, 2009
OVERVIEW OF SILVERLIGHT
MICROSOFT SILVERLIGHT
- Silverlight was formerly known as Windows Presentation Foundation Everywhere.
- It is a fast and a strong competitor to Adobe Flash.
- It is a cross-browser, cross platform plug-in, a light-weight subset of XAML, which supports Ajax, Python, Ruby, etc., and helps develop Rich Internet Applications (RIA) , and enables a rich .NET development platform that runs in the browser.
Features:
Cross-platform: Developers can write Silverlight applications using any .NET language (including VB, C#, JavaScript, IronPython and IronRuby).
Cross-browser: It runs on all major browsers(IE, FireFox, Safari, etc).
- Silverlight 2 does not require the .NET Framework to be installed on a computer in order to run.
- Visual Studio 2008 and Expression Studio tool support that enables great developer / designer workflow and integration when building Silverlight applications.
- Silverlight enables the display of high-definition video files.
- Silverlight framework allows the developer to create impressive animation effects in less time.
Some of the important features:
WPF UI Framework: Silverlight 2 includes a rich WPF-based UI framework that makes building rich Web applications much easier. It includes a powerful graphics and animation engine, as well as rich support for higher-level UI capabilities like controls, layout management, data-binding, styles, and template skinning.
Rich Controls: Silverlight 2 includes a rich set of built-in controls that developers and designers can use to quickly build applications.
Rich Networking Support: Silverlight 2 includes rich networking support. It includes out of the box support for calling REST, WS*/SOAP, POX, RSS, and standard HTTP services.
Rich Base Class Library: Silverlight 2 includes a rich .NET base class library of functionality (collections, IO, generics, threading, globalization, XML, local storage, etc).
Monday, June 8, 2009
GRID
It is similar to HTML table.
You can use the Grid layout to create fixed or relative sized cells and you can place controls within a cell or have them span a cell.
CANVAS
- Simplest and basic layout.
- It provides the simple ability to absolutely position child elements.
- It is used as a container for other Silverlight controls.
Canvas control has three properties:
- The Left property represents the distance between the left side of a control and its parent container canvas.
- The top property represents the distance between top of a control and its parent container canvas.
- The Z-Index property represents the z-order of a control. that is it determines whether the control is in front of or behind another overlapping control.
RULES OF ANIMATION
2.That means a Silverlight animation can do only one thing. Modify the values of a property over an interval of time.
3.For eg., the button , Width property uses the double data type. To animate in, you use the Double Animation class .If you want to modify the color that's used to paint the background of your canvas,you need to use the ColorAnimation class.
ANIMATION
- Animation allows you to create truly dynamic user interface.
- Animation are a core part of the Silverlight model that means you dont need to use timers and events handling code to put them into action.
- Silverlight animations is a scaled down version of the Windows Presentation Foundation animation system.
SILVERLIGHT.JS LIBRARY
- Silverlight.js library is a set of Javascript functions that provide interaction between unmanaged Javascript, the Silverlight plug in and Silverlight application.
- It is a helper file which enables web sites to create advanced Silverlight installation and installation experiences.
- It exposes function that helps to implement Silverlight application in web pages using Javascript.
- This library allows to create a Silverlight object in the DOM, Load Silverlight applications into the object, and then handle load events.
RESOURCE DICTIONARY
- A resource dictionary can store any object.
- You can loop through all the items.
- Each item stored must have a unique key.
- You can access the items using the Key or using their Index.
Sunday, June 7, 2009
LIFE CYCLE OF SILVERLIGHT
- The user request the HTML entry page in the browser.
- The Silverlight plug in is loaded.It downloads the XAP file with your application.
- The Silverlight plug in reads the AppManifest.xml file from the XAP to find out what assemblies your application uses.It creates the Silverlight runtime environment and then loads your application assembly into it.
- The Silverlight plug in creates an instance of your custom application class.
- The default constructor of the application class raises the Startup event.
- Your application handles the startup event and creates the Startup page.
ABOUT PANELS IN ENCODER
1.Panel-Display the video being encoded.
2.Timeline Panel-Displays the video's Timeline and various controls.
3.Media Conent Panel-Display the control you imported in the application as well as the logs.
4.Encode/Enhance/Metadata/Output panel-You can set up the way the video will be encoded.
EXPRESSION ENCODER
- Expression encoder encodes and publishes video.
- To encode video files,It is not a video editor though it has some video editing capabilities.
- It is not a Silverlight application editor,though it can produce a Silverlight content.
