Friday, February 26, 2010
What is M.S.I.L. or Microsoft Intermediate Language
MSIL stands for Microsoft Intermediate Language. When a programmer writes a program using VB or C# ,the compiler of that language converts it into an Intermediate code or Microsoft Intermediate Language and sends it to CLR which further converts it into native code for the machine.
Main components of .Net Framework
Base Class Library(BCL) and Common Language Runtime(CLR) are the main components of .Net Framework. BCL is the collection all the basic classes which are required for apllication development. These include classes like database classes,data access etc. CLR is used to convert the MSIL into code which is native to the machine.
Difference between Page.ClientScript.RegisterStartupScript and ClientScript.RegisterClientScriptBlock ?
RegisterStartupScript places the script at Bottom of page and RegisterClientScriptBlock at the Top of the page.
So placing your script on the page depends upon type of script.If the script uses a control than it should be placed at the bottom of the page rather than as controls will not be formed by the time script is fired.
So placing your script on the page depends upon type of script.If the script uses a control than it should be placed at the bottom of the page rather than as controls will not be formed by the time script is fired.
Tuesday, June 2, 2009
Check for blank space in string using Javascript
Following is a javascript function that helps to check for a blank space in a string :
<script type="text/javascript" language="javascript">
function check()
{
var Pattern=new RegExp(" ")
var val=pattern.exec(document.getElementById("<%=TextboxID.ClientID").value)
if(val==null)
{
alert("No space found");
}
else
{
alert("Blank space not allowed")
}
}
</script>
Finally this function can be called on event on which we want to check for the blank space in the string
<script type="text/javascript" language="javascript">
function check()
{
var Pattern=new RegExp(" ")
var val=pattern.exec(document.getElementById("<%=TextboxID.ClientID").value)
if(val==null)
{
alert("No space found");
}
else
{
alert("Blank space not allowed")
}
}
</script>
Finally this function can be called on event on which we want to check for the blank space in the string
Tuesday, May 19, 2009
Ajax Password Strength Extender
The Ajax password strength extender can ba applied to check for the strength of the password that is choosen by a user on your website. This helps the user to choose a strong password which increases the safety of the password theft also.
Steps to use Password Extender :
1. Add a Textbox on which the Extender is to be applied , on your Webform.
2. Apply the Password strength Extender to the Textbox.
3. Set the following properties for the Password Extender :
TargetControlID : The ID of the control on which Password strength is to be applied.
StrengthIndicatorType : Either text can be displayed or BarIndicator can be used.
PreferredPasswordLength : Length of the Password that should be used.
MinumumUpperCaseCharacters: Specifies the minimum Upper case alphabets required
MinumumLowerCaseCharacters: Specifies the minimum Lower case alphabets required
The above two properties are required only if the RequiresUpperandLowerCaseCharacters is specified as True.
Prefix Text : The text that is required to specify the strength of Password to the user.
Ex: Your Password strength is :
MinimumNumericCharacters : Specifies the minimum number of numeric values that should be used in Password.
MinimumSymbolCharacters : Specifies the minimum number of Special Symbols that should be used om Password
CalculationWeightings : Specifies the percentage strength of the various criterias used in the password. It reqiures 4 values with total of 100 is the maximum.
Ex : CalculationWeightings : 50;20;20;10 means Length forms 50 percent of total strength of the password ,Numeric forms 20 percent , Casing forms the 20percent and Special Symbols form the rest of the strength
DisplayPosition : The position where the Password strength should be displayed.
RequiresUpperandLowerCaseCharacters : Specifies whether the uppercase or lower caser alphabets are required.
HelpStatusLabelID : Specifies the ID of the Label control where the strength criteria is to be displayed to the user.
HelpHandleCSSClass :Specifies the CSS class for the Help control used to display the requirements.
HelpHandlePosition: Specifies the position of the Help Label being used.
TextStrengthDescription : Specifies the text for the strength level for the control
Ex : Average,Good,Very Good, Excellent. This property can be used when StrengthIndicatorType used is Text.
Steps to use Password Extender :
1. Add a Textbox on which the Extender is to be applied , on your Webform.
2. Apply the Password strength Extender to the Textbox.
3. Set the following properties for the Password Extender :
TargetControlID : The ID of the control on which Password strength is to be applied.
StrengthIndicatorType : Either text can be displayed or BarIndicator can be used.
PreferredPasswordLength : Length of the Password that should be used.
MinumumUpperCaseCharacters: Specifies the minimum Upper case alphabets required
MinumumLowerCaseCharacters: Specifies the minimum Lower case alphabets required
The above two properties are required only if the RequiresUpperandLowerCaseCharacters is specified as True.
Prefix Text : The text that is required to specify the strength of Password to the user.
Ex: Your Password strength is :
MinimumNumericCharacters : Specifies the minimum number of numeric values that should be used in Password.
MinimumSymbolCharacters : Specifies the minimum number of Special Symbols that should be used om Password
CalculationWeightings : Specifies the percentage strength of the various criterias used in the password. It reqiures 4 values with total of 100 is the maximum.
Ex : CalculationWeightings : 50;20;20;10 means Length forms 50 percent of total strength of the password ,Numeric forms 20 percent , Casing forms the 20percent and Special Symbols form the rest of the strength
DisplayPosition : The position where the Password strength should be displayed.
RequiresUpperandLowerCaseCharacters : Specifies whether the uppercase or lower caser alphabets are required.
HelpStatusLabelID : Specifies the ID of the Label control where the strength criteria is to be displayed to the user.
HelpHandleCSSClass :Specifies the CSS class for the Help control used to display the requirements.
HelpHandlePosition: Specifies the position of the Help Label being used.
TextStrengthDescription : Specifies the text for the strength level for the control
Ex : Average,Good,Very Good, Excellent. This property can be used when StrengthIndicatorType used is Text.
Ajax Mutually Exclusive Checkbox Extender
The Mutually Exclusive Checkbox extender can be applied to a collection of Checkobxes when we want the user to select only one checkbox from a collection of many. This can not be achieved with the normal checkbox (possible but not as possible as with the extender).
Steps to use Mutually Exclusive Checkbox Extender :
1. Add 2-3 Checkboxes on your webform.
2. Add the Mutually Exclusive Checkbox Extender to all the checkboxes.
3. Specify the following properties :
TargetControlID : The ID of Checkbox on which the Extender is to be applied.
Key : A common name given to all the extenders which makes all the checkboxes mutually exclusive for a given key name.
This is all that has to be done for using a Mutually Exclusive Checkbox Extender and your controls are ready to be used.
Ajax Slider Extender
The Slider Extender is applied on a Textbox control and is generally used to allow a user to select a value from the specified range only. For Ex: If we want the user to enter a value from 0 to 500 , we can specify a slider extender to let the user select from that range. The selected value can be displayed in a textbox or label deopending upon the requirements.
Steps to use Slider Extender :
1. Add a Textbox control to your webform .
2. Add the Slider Extender to the Textbox.
3. Specify the following properties :
TargetControlID : The ID of Textbox on which the Extender is to be applied
Minimum Value : The minimum value the slider should be starting from. (By default 0).
Maximum Value : The maximum value the slider can have (By default 100) .
BoundControlID : The ID of the control where you want to display the slider selected value
Steps : The number of steps you want the slider to be divided into.
Decimals : The number of decimal points upto which the value should be displayed
Apart from these , HandleCssClass to specify the CSS class to be used for handle , HandleImageURL for rendering an image for the handle, RailCssClass for CSS class for the slider and TooltipText for the Tooltip can also be used.
Subscribe to:
Posts (Atom)