Wednesday, February 9, 2011

Regular Expression

Need to find more then one value ( with a formated string .. Ex. {:Test:}) in a sting using RegEx.

//Step A
using System.Text.RegularExpressions;
//Step B
string input = "It contains lot of lines with this {:firstname:} and ({:lastname:})";
MatchCollection m = Regex.Matches(input, "{:[A-Za-z0-9_]+:}");
//Step C
Loop through the MatchCollection and find the each value

Wednesday, December 8, 2010

Gridview in asp.net

Paging
we need to follow these stpes to implement the paging in gridview

in asp.net page
AllowPaging="true" PageSize="20"
onpageindexchanging="FeaturesListView_PageIndexChanging">


in codebehind page

protected void MyGridView_PageIndexChanging(object sender, GridViewPageEventArgs
e){MyGridView.PageIndex = e.NewPageIndex;
LoadGridView();}

Monday, March 10, 2008

Visual studio Thread

Visual Studio 2008 - New Features

A quick list of some of the new features are:

  • Multi-Targeting support
  • Web Designer and CSS support
  • ASP.NET AJAX and JavaScript support
  • Project Designer
  • Data
  • LINQ – Language Integrated Query

http://www.codeproject.com/KB/dotnet/Visual_Studio_2008.aspx

Friday, February 22, 2008

Web.Config

Configuration File Format

ASP.NET configuration files are XML-based text files--each named web.config--that can appear in any directory on an ASP.NET Web application server. Each web.config file applies configuration settings to the directory it is located in and to all virtual child directories beneath it. Settings in child directories can optionally override or modify settings specified in parent directories. The root configuration file--WinNT\Microsoft.NET\Framework\\config\machine.config--provides default configuration settings for the entire machine. ASP.NET configures IIS to prevent direct browser access to web.config files to ensure that their values cannot become public (attempts to access them will cause ASP.NET to return 403: Access Forbidden).

At run time ASP.NET uses these web.config configuration files to hierarchically compute a unique collection of settings for each incoming URL target request (these settings are calculated only once and then cached across subsequent requests; ASP.NET automatically watches for file changes and will invalidate the cache if any of the configuration files change).

For example, the configuration settings for the URL http://myserver/myapplication/mydir/page.aspx would be computed by applying web.config file settings in the following order:

Base configuration settings for machine.
C:\WinNT\Microsoft.NET\Framework\v.1.00\config\machine.config

Overridden by the configuration settings for the site (or the root application).
C:\inetpub\wwwroot\web.config

Overridden by application configuration settings.
D:\MyApplication\web.config

Overridden by subdirectory configuration settings.
D:\MyApplication\MyDir\web.config
If a web.config file is present at the root directory for a site, for example "Inetpub\wwwroot", its configuration settings will apply to every application in that site. Note that the presence of a web.config file within a given directory or application root is completely optional. If a web.config file is not present, all configuration settings for the directory are automatically inherited from the parent directory.

Tuesday, February 12, 2008

Tools and S/w website collection

Download videos DIRECT from most video sites Copy the link of the page with the video on it and paste it here

http://keepvid.com/ ( ex .. we can download the YouTube videos to our PC )

https://addons.mozilla.org/en-US/firefox/addon/4318
( for FireFox users )