My Profile

Friday, February 11, 2011

Hiring fresher!

Hi !

Hope you are doing well !!

"Our Client is a global management consulting, technology services and outsourcing company, with more than 190,000 people serving clients in more than 120 countries.

Combining unparalleled experience, comprehensive capabilities across all industries and business functions, and extensive research on the world's most successful companies, Our client collaborates with clients to help them become high-performance
businesses and governments. "


We are looking for (B.E/B.TECH/MCA(freshers))candidates:::

candidates with any of the following skills can apply

'(((.NET ,JAVA/J2EE
, ORACLE,Testing Tools ,SAP(All Modules),PHP,Netwrok Admin,System Admin,C ,C++)))HYDERABAD BANGLORE \CHENNAI \PUNE\GURGOAN\KOLKATA work locations for Jr software engineer /team member/fresher/trainee)

Kindly Register yourself along with your updated CV , Passport Size Photograph ASAP so that we can process it further for the interview Between

10Am to 6Pm

"Also available Guarantee* Job with in 24 Hours. "(Terms And Condition Apply)


Contact HR Team:

JOBMAN CONSULTING GROUP.

A UNIT OF SUNMAN SYSTEMS PVT LTD,

HELP LINE:

+91 9505 22 1234, +91 9505 21 1234.

Land line:
+91 40 66487775,+91 40 66487776,+91 40 66803333.

Email:


info@jobman.in.

For more details

Visit us:
www.jobman.in



Office-Address:

4th Floor, Vaishanavi Plaza above Hyundai Showroom,

Near Charmas, Malakpet.

Hyderabad.

[Source : GMail]

---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support"

Thursday, February 10, 2011

ASP.Net - CustomValidator



1.    CustomValidator:
·       If all above four validation controls doesn’t fulfill our requirement then we have to use Customvalidator and write our own logic.
·       Again for client side validations, we have to write javascript code and for server side validations, we have to write C# code.

How to use CustomValidator for Client side validations?

·       Place Customvalidator and set the following properties:
 ControlToValidate       :
 ErrorMessage     :
 ClientValidationFunction*   : <JS func name>

·       Goto source view and implement JS function inside <script> tag.

This function should be specified with two arguments just like any .net event procedure arguments.
·        
Write code in this function to perform validation and return Yes/No to CustomValidator.
Example JS function:
<script type=”text/javascript”>
     function CheckQty(x , y)
     {
              If(y.Value % 5 == 0)
                        y.IsValid = true;
              else
                        y.IsValid = false;
     }
</script>

How to use CustomValidator for Server side Validations?

Server side validations means, when we submit the form it will be executed at server side. If any other code is there then as usual server will run that code also.

To find whether validation in the current page is successfully validated, we can use “Page.IsValid” property. This property returns true, if all validation controls in the page are successful. Otherwise, it returns false.
Follow the following steps to check this…

·       Place CustomValidator in the form and set the regular properties like:
 ControlToValidate :
 Errormessage  :
And other common properties…
·       Goto Properties window and in Events tab, select “ServerValidate” event. Double click on it; it will display a function in code window, where we have to write the validation code. Again using two arguments which are provided by even procedure or function.

While working with CustomValidator for server side validations and client side validations we have to be clear in points, those are:

·       How it is executed? **
·       For any reason submit doesn’t happen then server side validation will not execute.
·       When we submit the form to server, validation code will run but also other code (if any) will also be executed.

Let’s see an example to make it clear.

Example:
Design the form as following


·       Place a CustomValidator control beside textbox and set the following Properties
  ControlToValidate   :   TextBox1
  ErrorMessage            :  Quantity must be Below the Qty    Available.
  ForeColor                  :  Red

·       Goto Events of that CustomValidator and double click on “ServerValidate” event and write the following code in the function displayed.
if (Convert.ToInt32(args.Value) > 500)
            args.IsValid = false;
         else
            args.IsValid = true;

·        Under Button Click event:

if (Page.IsValid)
            Response.Write("Order Placed.....");
          else
            Response.Write("Please correct Errors!");




Yes! We are done with all Validation controls. Hope you all can do any validation in web forms now.

 
---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support"


ASP.Net - RegularExpressionValidator


 
1.    RegualrExpressionValidation Control:
·       With this control, we can perform validations by providing an expression, which is nothing but some characters indicating one format or a validation.
·       Many validations like checking for length of entered value, accepting only integers, alphabets or combination can be performed using this validator.
·       It is a language feature to support expression based validation and also some calculations.
·       .Net provides “System.Text.RegularExpressions” namespace which contains classes to perform expression based validations.
·       In ASP.Net RegularExpressionValidator also provides the same functionality. The advantage of using these expressions is to get more accuracy in validation as well as without writing code.

Some characters in regular expressions:
^        Beginning
$       Ending
{}       Length
\d      Digits
\w     word
[]       Range
And many more…

Examples:
  • [A-Za-z0-9]{6} : 6 alphabets (caps and small)/numbers/combination
  • [A-Za-z]{4}\d{2}  : first 4 characters alphabets and next 2 characters digits.
  • \d{10,12}  : digits, minimum 10 and maximum 12.


---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support"

ASP.Net - CompareValidator & ValidationSummary


Now we’ll see few more validation controls…

1.    CompareValidator:
·       It is a control which performs all validations related to comparison of controls.
·       This control can be used to perform 3 types of comparisons. Those are:
i.                   Control – Control:
With this use of this CompareValidator control, we can compare two different controls.
Apart from common properties this control has some more properties, those are:
Properties:
·       ControlToValidate : <controlname>
·       ControlToCompare : <controlname to which we are comparing>
·       Type : data type
·       Operator : Equal/NotEqual/GreaterThan….
ii.                Control – Value:
With this use of this control, we can compare the control with some value we specify.
Properties:
·       ControlToValidate :
·       ValueToCompare :
·       Type :
·       Operator :

iii.              Control – Data Type:
With this use of this property, we can compare the control with Data Type specified.

Properties :
·       ControlToValidate :
·       Type :
·       Operator : DataTypeCheck *

2.    ValidationSummary:
·       This control doesn’t perform any validations but reports all validation control error messages at one place. That is why it is called summary control. Display property with None value can be used for the Validation control Error messages in this kind of situations. Because, we want to display errors only at one location and that is near control or separately.
·       To use it, we have to just place it on the form and it automatically gets messages.
Properties:
·       ShowMessageBox : true/false(d)
When true, then VS will display error messages in separate alert window.
·       ShowSummary: true(d)/false
When false, within the form, summary control will not display the errors.

Note: when SummaryControl is present in form then ErrorMessage will appear in Summary control and Text will appear in place of validation Control (Useful).

 
---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support"

ASP.Net-RequiredFieldValidator & RangeValidator


Let’s see one by one control in detail:

1.    RequiredfieldValidator:
·       Used to check for null values and it is the only control which can check null values.
·       Properties:
ControlToValidate   :   <ControlName>

ErrorMessage          :    Message to be displayed when        error occurs.

 Text                          :     Same like error message but differs when   ValidationSummary Control is used.

 SetFocusOnError     :     true/false  [Automatically sets the cursor to failed validation control]

Note: Above properties are used for RequiredfieldValidator and also they are common properties for every Validation Control.

Example: 

Place a TextBox or any control and also place RequiredFieldValidator control beside it and set the above properties and test how it works.

2.    RangeValidator:
·       Used to check for range of values. It is suitable for numeric and date type of data.
·       Properties:
 MinimumValue       :        <some value> [inclusive of this value]
 MaximumValue       :        ------------
 Type                         :        Integer/Date/……

Note: we cannot use validations for all the controls. For example, we cannot use any validation for “CheckBox” because it has only 2 options checked or unchecked.

Before going to see remaining validation control, we have to see one most important property “Display”, which is also a common property to all the validation controls.

Display:
It is an enumerated property which has the following values:
·       Static
·       Dynamic
·       None

This property is related to position of validation control or Message that is to be displayed. By default, it is Static, which means the place to display Error Message will be reserved. Dynamic means Error Message place will not be reserved and only when error occurs it will create the place and display error message. None means no display of error message.
In the next post we’ll see few more validation controls…

 
---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support"

ASP.Net Validation Controls Introduction


Hello Friendzz…

Till now we have worked with different controls, navigation between forms, and how to work (data binding) in the web environment etc., 

and now we are going to discuss about a new topic “Validations”.

It is also a major requirement in the web forms. Every web page requires validations in client side as well as server side. Validation means “simple set of statements that are written to check whether the given input is in correct format or with correct values”.

Client side validations means the validations which are to be performed on client side i.e., say Browser.

Ex: checking whether an input (say User Id) is provided or not is client side validation.

Server side validations mean the validations which are to be performed on server side.

Ex: checking whether the entered user id already exists in Database or not is server side validation.

How every web developer performs these validations?
·        
     For client side validations, Java Script coding is written and sent to client for execution.
·       For server side, validations are performed using server side programming language.

But in both cases user must write code to perform validations.

How to perform validations in ASP.Net web forms?

As part of its controls, ASP.Net provides one category called “Validation”. In this category, we have validation controls which automate the process of performing validation. Every ASP.Net validation control generates Javascript code for client side validations and server side code for server validations automatically.

User has to provide few inputs to mention what type of validation is required.

ASP.Net supports the following Validation Controls to perform different requirements:
·       RequiredFieldValidator
·       RangeValidator
·       CompareValidator
·       RegularExpressionValidator
·       CustomValidator
·       ValidationSummary
·       Dynamicvalidator (.Net 4.0)

 

---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support"

Panel Control



It is equivalent to HTML <div> tag. It is a container, where we can place other controls inside it.

It will be helpful for grouping the content as well as scrolling functionality inside the form.

 How to use panel?

Place the control on the form, goto source view and type all the content required inside panel tags. Content can be simple text or other controls also.
Provide height, width properties for a panel and then enable scroll bars using “ScrollBars” property, which is an enumerated property with values vertical, horizontal, Both, Auto.

On rendering, panel will be converted to HTML <div> tag.

Try yourself the following example:

“Design a form with 4 “LinkButtons” saying Personal, Experience, Academics and Preview. When user clicks personal, form should provide inputs for entering personal details, experience- It should take experience details and similarly academic details. When user click on Preview then we must display all entered details as one Resume”.

 
---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support" .

How to use MultiView Control?




We’ll see how to use this control in a step wise manner.

Step 1: In a form place common (common to all the views) content like image and LinkButtons on the top of the form.

Step 2: Create “MultiView” Control and place required views inside it using “View” control. Design View content according to the requirement.

Step 3: MultiView control has “ActiveViewIndex” property, which is used to specify the view to be displayed. Its default value is “-1”. 

Step 4: In created LinkButtons write code to display the required view like:
                   MultiView1.ActiveViewIndex = 1;

Example: with this example we can get clear idea about how to use MultiView.

Step 1: design the form as following.




Step 2: Coding

Under User Info [LinkButton] click Event:
    MultiView1.ActiveViewIndex = 0;

Under Images [LinkButton] click Event:
    MultiView1.ActiveViewIndex = 1;

Under Contact Us [LinkButton] click Event:
    MultiView1.ActiveViewIndex = 2;

That’s it... You’re done!!

---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support" .

Some standard and Rich controls


In the previous post, we have worked with generic collections and Data Binding

Now we are ready to move forward i.e., to validations.
 
Before going to that we’ll see some more standard and rich controls.

In this post, we are going to see 3 rich controls:
·        
  •     MultiView
  • ·       View
  • ·       Panel


Let’s see one by one.

MultiView:
          It is also a rich control of ASP.Net and we can use it to display multiple views in a page, normally when we have lot of content in a page then we divide it into multiple pages which is not preferred method today. We can use MultiView control and display multiple pages data into multiple views of this control.

          A MultiView is a collection of views and every view is represented with another control called view.

View:
          We cannot use View control or MultiView control alone i.e., we should use these two controls together.

In order to display different pages in different views of MultiView, first take MultiView and then inside it take as many number of Views as we want(to some limit otherwise performance degrades) and then design each page in each view.

---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support" .

Generic Collections


In the previous program, we have used ArrayList class which is not preferred with respect to performance. i.e., as the classes under System.Collections undergo Boxing and Unboxing, the performance of the application degrades. So, System.Collections is not much preferred to be used.

In .Net generic classes are provided for better programming.
“System.Collections.Generic” is the namespace under which all the generic classes are provided. One of the important generic class is List<T>. it is the class inside it which is a collection of type T. T is a type like int, string, Employee etc.,

Example:       List<int> obj;
//List<int> is the class inside it which is a collection of type int.
//obj is the variable of that collection class.

Example: In the previous example modify the utility class as following:

Using System.Collections.Generic;
Public class utility
{
            Public static List<string> GetCountries()
            {
                        List<string> obj = new List<string>();
                        obj.Add(“United States”);
                        obj.Add(“India”);
obj.Add(“Australia”);
obj.Add(“United Kingdom”);
                        return obj;
            }
}

That’s it… the program will run perfectly. No need to change anything in the form code.
This is the advantage we’ll get if we maintain code file separately instead of combining code with the form.

Hope you understood how to handle generic classes and data binding.
Check yourself whether you’re clear or not with the following exercise.

“take one List control for Countries and another list control for Players, whenever user selects one country the corresponding players should come in second List control. Now take another list control for features of player, whenever user selects player atleast 5 features of that particular player should come in 3rd List control. And also take an image control display the player picture when the player is selected along with the features.”

---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support" .

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More