Showing posts with label AJAX. Show all posts
Showing posts with label AJAX. Show all posts

Wednesday, November 02, 2011

How to get current page Filename using C#

There are different ways to get current page filename using c#. Here are 3 methods you can use for your advantage.

Method 1
string currentPageFileName = new FileInfo(this.Request.Url.LocalPath).Name;

Method 2

string sPath = HttpContext.Current.Request.Url.AbsolutePath;
string[] strarry = sPath.Split('/');
int lengh = strarry.Length;
string sReturnPage = strarry[lengh - 1];

Method 3

string absPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
System.IO.FileInfo finfo = new System.IO.FileInfo(absPath);
string fileName = finfo.Name;


Out of these I like Method 1 and 3 as its straight forward. Use a per your advantage. Good luck.

Friday, March 12, 2010

Saturday, October 03, 2009

Doloto – Download time optimizer for web 2.0 apps

Doloto is an AJAX application optimization tool, useful for large and complex Web 2.0 applications that contain a lot of code. Doloto analyzes AJAX application workloads and automatically performs code splitting of existing large Web 2.0 applications. After being processed by Doloto, an application will initially transfer only the portion of code necessary for application initialization.


  • Minimum: .NET Framework 3.5 (in US English only)

Doloto reduced the amount of initial downloaded JavaScript code by over 40%, or hundreds of kilobytes resulting in startup often faster by 30-40%, depending on network conditions

Download and Install Doloto.

Walkthrough Doloto

Saturday, July 07, 2007

Asp.Net Ajax Debugging

Dan Walhin made this good video tutorial to show us steps needed to debug client side script :
Video : Debugging Ajax Application with Visual Studio 2005

Basically, The following steps need to be performed
Step1: Need to tweak IE to enable client script debugging :Go to Tools > Internet Options > Advanced and uncheck both "Disable script debugging (Internet Explorer)" and "Disable script debugging (Other)" .

Step2:Then in your client code where you want the breakpoint write"Something") Microsoft AJAX method to launch debugging, with this message "There is no source code available for the current location",

Step3:Please use the Script Explorer window (Debug > Windows > Script Explorer) to get a list of all loaded Js scripts
[Note: if you can't find Script Explorer window check this in VS2005( Tools > Customize>Go to Commands Tab> Choose Debug from the left listbox> You will see Script Explorer on the right listbox> Drag the ScriptExplorer to your desired menubar)

Step4:then you can select any one of the loaded js scrips, debug and step-in your client code and also into the AJAX Framework!

Asp.Net Ajax Resources

Asp.Net Ajax Resources, Links and Documentation

Getting Started
Installing ASP.NET AJAX
Sample ASP.NET AJAX Application
Introduction to the UpdatePanel Control
Introduction to the UpdateProgress Control
Introduction to the Timer Control

ASP.NET AJAX Server Controls
UpdatePanel Control Overview
The UpdatePanel Control
UpdateProgress Control Overview
The UpdateProgress Control
Timer Control Overview
The Timer Control
ScriptManager Control Overview

Client Scripting
Extending JavaScript with ASP.NET AJAX
Creating Custom Client Script in ASP.NET AJAX
Embedding a JavaScript File as a Resource in an Assembly
Embedding Localized Resources for a JavaScript File

Debugging and Tracing
ASP.NET AJAX Debugging and Tracing Overview

Web Services
Asynchronous Communication Layer Overview
Exposing Web Services to Client Script
Calling Web Services from Client Script
ASP.NET Application Services

Localization and Globalization
Localizing Resources for Component Libraries Overview
Globalizing a Date by Using Client Script
Embedding Localized Resources for a JavaScript File

Extending ASP.NET AJAX
Creating Custom ASP.NET AJAX Non-Visual Client Components
Creating Custom ASP.NET AJAX Client Controls
Adding Client Behaviors to Web Server Controls by Using ASP.NET AJAX Extensions
Adding Client Capabilities to a Web Server Control by Using ASP.NET AJAX Extensions