Ready to proceed again…
November 25th, 2009Hey friends now i will start blogging again on pending Ajax Control so please keep reading…
Thanks
Nikhil Kumar
| Create Free Blog | Random Blog » | Report Abuse | Login |
Hey friends now i will start blogging again on pending Ajax Control so please keep reading…
Thanks
Nikhil Kumar
Learning JAVA for beginners …
Salute,
I am Nikhil
Here you will learn java in simple steps like a beginner
So let’s start java… with live example for creating simple and interesting games…
For running java you have to install small software named JAVA SDK
you know java is platform independent …
What is JDK (Java Development Kit) ?
JDK is a software development program provided by sun Microsystems. Java Development Kit or JDK comes in various versions and can be downloaded free from the sun Microsystems. JVM compiler, debugger and other tools are used with JDK for developing java based application & java applets. So make sure that your JVM compiler & JDK versions are same.
JDK also known as Java 2 Platform That comes in three editions J2ME, J2SE & J2EE. If you are beginner or learning Java then start by downloading J2SE.
Acronyms:
JDK Java Development Kit
JVM Java virtual machine
Download JDK
you can download JDK from www.javasoft.com/j2se
Latest version of JDK
1. JDK 5.0 Update 6
the full internal version number for this update release is 1.5.0_06-b05 (where “b” means “build”). The external version number is 5.0u6. Java Version 1.5.0_06 introduces various security enhancements in Java Plug-in and Java Web Start to better protect users and enterprises. For more information please visit: http://java.sun.com/j2se/1.5.0/ReleaseNotes.html
SO let’s start learning java particles…
The first program we are going to learn is a simple java application “Hello Java”
in which you create a program and run it then it will show a message …
So The first step is Open your notepad and type this program,
//Simple java application…
public class Hellojava
{
public static void main (String [] args)
{
System.out.println(“Hello ! Java”);
}
}
I suggest you to type this program by your own without seeing this…
Now save this notepad file as “Hellojava.java”
The point is, you have to save this file by the class name which you have given in the program and you have to use the .java extension
Setting the path
Now you have to do an important task is to set the path for java
So let’s start .
First Step
Go to run type sysedit
Now type this in the AUTOEXEC.BAT file
SET PATH=C:\WINDOWS\COMMAND;C:\JDK1.3.1\BIN
Or if you install jdk in another drive then give that path…
now save and exit
Running Application
Open command prompt go in the drive (where you save your notepad file)
Then type__
javac Hellojava.java
now run your application__
java Hellojava
a message will seem “Hello ! Java”
What you did !
Line of code is a blank line, which as you might imagine, does nothing.
Following that is the beginning of your program class definition:
public class HelloWorld {
You must define a class in every Java program. Basically, a class is a group of functions
and characteristics in Java code that can be reused. The public keyword,
used as a modifier that describes other classes’ access to this class, is not
required, but it is a good idea to use it anyway. This way you will start off with
good coding habits. It is not necessary at this point to fully understand the public
keyword.
The same goes for the class keyword. It is used to identify Hellojava as a class.
The open brace denotes the beginning of the contents of your class definition
and the corresponding closing brace (the last line of the program) denotes the
end of the class definition. To sum it up, this line of code starts a Java program
called Hellojava, and all the code within the braces makes up its guts.
.
The next line of code starts the main() method definition.
public static void main(String args[]) {
Methods are groups of statements that are executed by your computer when
instructed to do so. You learn about methods in Chapter 5. For now, it is important
that you know that the main() method actually drives Java applications. It is
the first place the Java VM looks when you run your application. The group of
statements within this method, collectively called a block statement, is defined
within its own set of braces. Within the braces of this method, you define a list
of steps you want the computer to do when running your program.
The one statement inside the main() method, which is your next line of code,
instructs your computer to say hello to the world.
System.out.println(”Hello, world!”);
This is actually a call to a method that handles your system’s standard output. It
prints one line to the screen and adds a carriage return. You can refer to the Java
API documentation for classes System and PrintStream for more detailed information
.
Congrats ! now you know the syntax and knowledge about JAVA
Thanks
|
|
|
Rounded Corner Extender
In this article, I will show you step by step procedure, how to use a Rounded Corner Extender
In ASP.NET using Visual Studio 2005 or Visual Studio 2008.
Rounded Corner Extender is used for formatting the web page like this…
To follow this code sample, you must use Visual Studio 2005 or Visual Studio 2008.
I have used <! – –> to comment HTML part of the code.
Note: Rounded Corner Extender is a part of AjaxControlToolkit.
To attach right click on the toolbox under Ajax Extensions and select Choose Items - > Browse Button - > select the AjaxControlToolkit.dll. If you are using Visual Studio 2008, you may not need AJAX Toolkit but if you are using Visual Studio 2005, you will need to download it from http://www.msdn.com/ or http://www.asp.net/.
Step 1. Start -> All Programs -> Visual Studio 2005 or Visual Studio 2008
Step 2. Now go to File Menu -> New -> Web Site
Step 3.
Under Visual Studio Installed Template-> Choose ASP.NET WEB SITE -> Choose File System from the location combo box -> Set the path by the browse button - > Choose the language from the Language ComboBox (Visual C# , Visual Basic , J #)
Choose Visual C#
Step 4. Click on the OK Button.
This is the source code window and in this page you will se this code.
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> <title>Type your webpage title here</title> <!– Here you can specify your page title in between title tag -> </head> <body> <form id=”form1? runat=”server”> <div>
<!– In between div tags you can manage your web controls like buttons, labels, picture Box, ImageMap etc –>
</div> </form> </body> </html> |
See here is a tab named Design in the bottom of this page.
Step 5. Click on this tab and you will see a blank web page where you can drag any control from the toolbox (which is in the left side of this window).
Step 6. Now drag controls under the AJAX Extensions.
First control you are going to drag and drop on the page is - Script Manager.
first add a tag on the top of your source code window:
<%@ Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”cc1″ %>
Under the form tag,
Don’t be frustrate on seeing this code please read carefully it’s very simple.
|
<div>
<asp:ScriptManager ID=”ScriptManager1″ runat=”server”> </asp:ScriptManager>
<asp:Panel ID=”Panel1″ runat=”server” BackColor=”LightPink”>
<center> <asp:Image ID=”image1″ runat=”server” ImageUrl=”~/lod.gif” /> </center>
</asp:Panel>
<c1:RoundedCornersExtender runat=”server” ID=”rd1″ TargetControlID=”Panel1″ BorderColor=”DarkGreen” Radius =”50″ Corners=”All”> </c1:RoundedCornersExtender>
|
Step 7. Now run your web site by Ctrl + F5
OUT PUT
Step 8. When you run the Rounded Corner Extender will seem like this…
Rounded Corner Extender is used for format you web page… I have used a panel here and you know that the corner of panels are not rounded they always of straight and here the corners are rounded that’s the use of Rounded Corner Extender which is a Ajax Control Toolkit Control…
Step 9. Close Browser
Step 10. Close Visual Studio…
Thanks!
–Nikhil Kumar
|
|
|
Partial Page Update
In this article, I will show you step by step procedure, how to use a Partial Page Update
In ASP.NET using Visual Studio 2005 or Visual Studio 2008.
The use of Partial Page Update it that if you want to update the specific part of the web page then you can use it…
To follow this code sample, you must use Visual Studio 2005 or Visual Studio 2008.
I have used <! – –> to comment HTML part of the code.
Step 1. Start -> All Programs -> Visual Studio 2005 or Visual Studio 2008
Step 2. Now go to File Menu -> New -> Web Site
Step 3.
Under Visual Studio Installed Template-> Choose ASP.NET WEB SITE -> Choose File System from the location combo box -> Set the path by the browse button - > Choose the language from the Language ComboBox (Visual C# , Visual Basic , J #)
Choose Visual C#
Step 4. Click on the OK Button.
This is the source code window and in this page you will se this code.
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> <title>Type your webpage title here</title> <!– Here you can specify your page title in between title tag -> </head> <body> <form id=”form1? runat=”server”> <div>
<!– In between div tags you can manage your web controls like buttons, labels, picture Box, ImageMap etc –>
</div> </form> </body> </html> |
See here is a tab named Design in the bottom of this page.
Step 5. Click on this tab and you will see a blank web page where you can drag any control from the toolbox (which is in the left side of this window).
Step 6. Now See the code carefully
I suggest you to not to drag the controls from the toolbox please type the code it’s good..
First control you are going to drag and drop on the page is - Script Manager.
Under the form tag,
Don’t be frustrate on seeing this code please read carefully it’s very simple.
|
<div> <asp:ScriptManager ID=”ScriptManager1″ runat=”server”> </asp:ScriptManager>
<asp:Panel ID=”Panel1″ runat=”server” BackColor=”LightSeaGreen” BorderColor=”DarkRed” BorderStyle=”Double”> <asp:Label ID=”label1″ runat=”server”></asp:Label> <br /> <br />
<asp:UpdatePanel runat=”server” ID=”Up1″> <ContentTemplate> <asp:Panel ID=”Panel2″ runat=”server” BackColor=”LightPink” BorderColor=”DarkBlue” BorderStyle=”Solid”> <asp:Label ID=”label2″ runat=”server”></asp:Label> <br /> <br /> <asp:Button ID=”button1″ runat=”server” Text=”Partial Update” /> </asp:Panel> </ContentTemplate> </asp:UpdatePanel> <br /> <br /> <br /> <br /> <asp:Button ID=”button2″ runat=”server” Text=”Full Update” /> </asp:Panel>
</div> |
Step 7. Now type this code under this line…
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
|
<script runat=”server” language=”C#”>
protected override void OnLoad(EventArgs e) { base.OnLoad(e); string time=DateTime.Now.ToString(); label1.Text=time; label2.Text=time; }
|
Step 8. Now run your web site by Ctrl + F5
OUT PUT
Step 9. When you run the Partial Page Update will seem like this…
Here are two buttons One Partial Update and Full Update
When you click the Partial Update then only the pink background time will update
And when you click the Full Update Button both backgrounds color will update….
Step 10. Close Browser
Step 11. Close Visual Studio…
Thanks!
–Nikhil Kumar
|
|
|
Masked Edit Extender
In this article, I will show you step by step procedure, how to use a Masked Edit Extender
In ASP.NET using Visual Studio 2005 or Visual Studio 2008.
The use of Masked Edit Extender it that you are not require to type any number of character you have to just select from the up down button…it will change dynamically when you click the button,
To follow this code sample, you must use Visual Studio 2005 or Visual Studio 2008.
I have used <! – –> to comment HTML part of the code.
Note: Masked Edit Extender is a part of AjaxControlToolkit.
To attach right click on the toolbox under Ajax Extensions and select Choose Items - > Browse Button - > select the AjaxControlToolkit.dll. If you are using Visual Studio 2008, you may not need AJAX Toolkit but if you are using Visual Studio 2005, you will need to download it from http://www.msdn.com/ or http://www.asp.net/.
Step 1. Start -> All Programs -> Visual Studio 2005 or Visual Studio 2008
Step 2. Now go to File Menu -> New -> Web Site
Step 3.
Under Visual Studio Installed Template-> Choose ASP.NET WEB SITE -> Choose File System from the location combo box -> Set the path by the browse button - > Choose the language from the Language ComboBox (Visual C# , Visual Basic , J #)
Choose Visual C#
Step 4. Click on the OK Button.
This is the source code window and in this page you will se this code.
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> <title>Type your webpage title here</title> <!– Here you can specify your page title in between title tag -> </head> <body> <form id=”form1? runat=”server”> <div>
<!– In between div tags you can manage your web controls like buttons, labels, picture Box, ImageMap etc –>
</div> </form> </body> </html> |
See here is a tab named Design in the bottom of this page.
Step 5. Click on this tab and you will see a blank web page where you can drag any control from the toolbox (which is in the left side of this window).
Step 6. Now drag controls under the AJAX Extensions.
First control you are going to drag and drop on the page is - Script Manager.
first add a tag on the top of your source code window:
<%@ Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”cc1″ %>
Under the form tag,
Don’t be frustrate on seeing this code please read carefully it’s very simple.
|
<asp:ScriptManager ID=”ScriptManager1″ runat=”server”> </asp:ScriptManager> <br /> Enter the details below in the textboxes and you will see how the masked control Works <br /> <div> <asp:Label ID=”Label1″ runat=”server” Text=”Enter your name” ></asp:Label>
<asp:TextBox ID=”TextBox1″ runat=”server” Width=”150px”></asp:TextBox> <br /> <br />
<asp:Label ID=”Label2″ runat=”server” Text=”Enter your roll number”></asp:Label>
<asp:TextBox ID=”TextBox2″ runat=”server” Width=”150px”></asp:TextBox>
<cc1:MaskedEditExtender ID=”MaskedEditExtender1″ runat=”server” TargetControlID=”TextBox2″ MaskType=”Number” Mask=”999″ MessageValidatorTip=”true” AcceptNegative=”None” InputDirection=”RightToLeft” ErrorTooltipEnabled=”true” > </cc1:MaskedEditExtender>
<cc1:MaskedEditValidator ID=”MaskedEditValidator1″ runat=”server” ControlToValidate=”TextBox2″ ControlExtender=”MaskedEditExtender1″ MinimumValue=”1″ MaximumValue=”105″ MinimumValueMessage=”Please enter correct roll number” MaximumValueMessage=”Invalid roll number! The highest roll number is 105″ Display=”Dynamic” IsValidEmpty=”false” InvalidValueMessage=”The roll number does not exist” EmptyValueMessage=”The roll number is not entered”> </cc1:MaskedEditValidator>
<br /> <br /> <asp:Label ID=”Label3″ runat=”server” Text=”Enter date of birth (mm/dd/yyyy)”></asp:Label> <asp:TextBox ID=”TextBox3″ runat=”server” Width=”150px”></asp:TextBox>
<cc1:MaskedEditExtender ID=”MaskedEditExtender2″ runat=”server” TargetControlID=”TextBox3″ MaskType=”Date” Mask=”99/99/9999″ MessageValidatorTip=”true” UserDateFormat=”None” UserTimeFormat=”None” InputDirection=”RightToLeft” ErrorTooltipEnabled=”true” > </cc1:MaskedEditExtender>
<cc1:MaskedEditValidator ID=”MaskedEditValidator2″ runat=”server” ControlToValidate=”TextBox3″ ControlExtender=”MaskedEditExtender2″ Display=”Dynamic” IsValidEmpty=”false” InvalidValueMessage=”Invalid date!” EmptyValueMessage=”The date is not entered”>
</cc1:MaskedEditValidator> <br />
|
Step 7. Now run your web site by Ctrl + F5
OUT PUT
Step 8. When you run the Masked Edit Extender will seem like this…
Now in the Masked text boxes you can’t enter characters or hexadecimal values you can only enter digits and here will be some restrictions… which the masked text box will follow …
Step 9. Close Browser
Step 10. Close Visual Studio…
Thanks!
–Nikhil Kumar
|
|
|
Up Down Extender
In this article, I will show you step by step procedure, how to use a Up Down Extender
In ASP.NET using Visual Studio 2005 or Visual Studio 2008.
The use of Up Down Extender it that you are not require to type any number of character you have to just select from the up down button…it will change dynamically when you click the button,
To follow this code sample, you must use Visual Studio 2005 or Visual Studio 2008.
I have used <! – –> to comment HTML part of the code.
Note: Up Down Extender is a part of AjaxControlToolkit.
To attach right click on the toolbox under Ajax Extensions and select Choose Items - > Browse Button - > select the AjaxControlToolkit.dll. If you are using Visual Studio 2008, you may not need AJAX Toolkit but if you are using Visual Studio 2005, you will need to download it from http://www.msdn.com/ or http://www.asp.net/.
Step 1. Start -> All Programs -> Visual Studio 2005 or Visual Studio 2008
Step 2. Now go to File Menu -> New -> Web Site
Step 3.
Under Visual Studio Installed Template-> Choose ASP.NET WEB SITE -> Choose File System from the location combo box -> Set the path by the browse button - > Choose the language from the Language ComboBox (Visual C# , Visual Basic , J #)
Choose Visual C#
Step 4. Click on the OK Button.
This is the source code window and in this page you will se this code.
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> <title>Type your webpage title here</title> <!– Here you can specify your page title in between title tag -> </head> <body> <form id=”form1? runat=”server”> <div>
<!– In between div tags you can manage your web controls like buttons, labels, picture Box, ImageMap etc –>
</div> </form> </body> </html> |
See here is a tab named Design in the bottom of this page.
Step 5. Click on this tab and you will see a blank web page where you can drag any control from the toolbox (which is in the left side of this window).
Step 6. Now drag some controls under the AJAX Extensions.
First control you are going to drag and drop on the page is - Script Manager.
first add a tag on the top of your source code window:
<%@ Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”cc1″ %>
Under the form tag,
Don’t be frustrate on seeing this code please read carefully it’s very simple.
|
<asp:ScriptManager ID=”ScriptManager1″ runat=”server”> </asp:ScriptManager> <div>
<br /> Enter/Select the Text requested below and see the usage of NumericUpDown control <br /> <br /> <asp:Label ID=”Label1″ runat=”server” Text=”Enter your roll number”></asp:Label>
<asp:TextBox ID=”TextBox1″ runat=”server” Height=”18px” nabled=”False”></asp:TextBox> <br /> <br /> <asp:Label ID=”Label2″ runat=”server” Text=”Select your month of joining”></asp:Label> <asp:TextBox ID=”TextBox2″ runat=”server” Height=”18px”></asp:TextBox> <br /> <br /> <asp:Button ID=”Button1″ runat=”server” Text=”Submit” />
<cc1:NumericUpDownExtender ID=”NumericUpDownExtender1″ runat=”server” TargetControlID=”Textbox1″ Width=”150″ Step=”1″ Minimum=”1″ Maximum=”100″> </cc1:NumericUpDownExtender>
<cc1:NumericUpDownExtender ID=”NumericUpDownExtender2″ runat=”server” Step=”1″ TargetControlID=”TextBox2″ Width=”150″ RefValues=”January; February; March; April; May; Jun; July; August; September; October; November; December”> </cc1:NumericUpDownExtender> </div> |
Step 7. Now run your web site by Ctrl + F5
OUT PUT
Step 8. When you run the Up Down Extender will seem like this…
Now when you click the up or down arrow the value will change itself there is no need of typing…
Step 9. Close Browser
Step 10. Close Visual Studio…
Thanks!
–Nikhil Kumar
|
|
|
These are very knowledgeable questions of ASP.NET
To use the objects of GDI+, an object of the Graphics class must be created. Which of the following methods of the Graphics class is used to free all the resources being used by the currently loaded graphic?
1, Flush
2, Dispose
3, Clear
4, Kill
Solution 2
The AlternateView class can be used to embed an attachment to an E-mail message. Which of the following enables the AlternateView class to embed images in a message?
1, Attachment
2, BaseUri
3, ContentLink
4, LinkedResources
Solution 4
There are different ways of specifying security permissions in your code. Which of the following uses code attributes to specify the permissions that are required to execute an assembly?
1, Imperative syntax
2, caspol.exe
3, Declarative syntax
4, TlbImp.exe
Solution 3
Host evidence is the evidence from the application domain or the host in which an assembly executes. Which of the following is NOT a type of host evidence?
1, Site
2, Zone
3, Subscriber
4, Hash
Solution 3
Visual Studio 2005 includes Device Emulator 1.0. Which of the following is NOT emulated by this software?
1, Microsoft Windows CE 5.0
2, Microsoft Pocket PC 2003
3, Symbian OS S60
4, Microsoft Smartphone 2003
Solution 3
Which of the following Mobile controls is used to group child controls and can modify several child controls in a single operation?
1, ObjectList
2, Form
3, Panel
4, List
Solution 3
Which of the following is NOT a type of Web site that can be created using Visual Studio 2005?
1, Local IIS Web sites
2, Remote IIS Web sites
3, FTP sites
4, Dynamic Web sites
Solution 4
When you type code in the Source view, a drop down list is displayed that helps you complete the syntax of the code. Which feature of Visual Studio makes this possible?
1, ComboBox
2, IntelSense
3, Intellisense
4, ListView
Solution 3
In your web application, you need to ensure that the format of the pages that you display is supported by the requesting browsers. Which of the following is a property that can be used to detect the type of the browser requesting the pages, so that they can be displayed accordingly?
1, Request.Browser
2, Response.Browser
3, Request.Browser.Browser
4, Request.Browser.Type
Solution 3
Using the CompareValidator control, you can compare the user input to which type of value? m
1, Constant value
2, Variable value
3, Memory address
4, URL
Solution 1
Consider the following statements in context of the validation controls available in ASP.NET:
Statement A: The validation controls can perform simple validation in the user’s Web browser by generating VBScript code, if the browser supports it.
Statement B: The CompareValidator control validates a user’s entry against a constant value, or a property value of another control.
Which of the preceding statements are TRUE?
1, Statement A is TRUE and statement B is FALSE.
2, Statement A is FALSE and statement B is TRUE.
3, Both statements, A and B, are TRUE.
4, Both statements, A and B, are FALSE.
Solution 2
Which mechanism is provided by ASP.NET that preserves the contents and state of the controls on a Web page when a user enters data and submits the form and when the page is re-displayed?
1, StateServer
2, ViewState
3, HttpSessionState
4, HttpApplicationState
Solution2
In the context of ASP.NET, when the server needs to free the memory, it can remove an item from the application’s cache. What is this process known as?
1, Absolute expiration
2, Sliding expiration
3, Flush
4, Scavenging
Solution 4
Which of the following is a delegate that defines the signature to use for an event handlers that responds when an item is deleted from the cache?
1, onRemoveCallback
2, CacheItemRemovedCallback
3, CacheItemRemovedReason
4, RemovedCallback
Solution 2
Which of the following can you configure to retrieve data from the following:
– XML files
– Web services that return XML data
– String variables that contain XML data
1, XmlDataDocument objects
2, XmlDataSource control
3, SqlDataSource control
4, FormView control
Solution 2
–Nikhil Kumar
|
|
|
These are basic knowledge questions about ASP.NET which should know to every one who learn ASP.NET …
Using which of the following can you maintain the state data of your web server control, even when the ViewState property is disabled for the page?
1, ControlState data
2, Session.Start
3, Application.Start
4, StateServer Mode
Solution 1
Which of the following data-bound controls displays one or more records from a data source, one record at a time?
1, GridView Control
2, TreeView Control
3, DetailsView Control
4, DataList Control
Solution 3
Which of the following controls features hierarchical data- binding and may be bound to an XmlDataSource or a SiteMapDataSource?
1, DropDownList Control
2, Menu Control
3, DataList Control
4, GridView Control
Solution 2
5 Which of the following classes provides methods for creating, deleting, and updating user accounts, authenticating users, and managing passwords?
1, Members Class
2, Membership Class
3, Member Class
4, FormsAuthentication Class
Solution 2
Which of the following data-bound controls displays multiple records, typically in a table and does not provide a predetermined layout for the data.
1, Menu Control
2, DataList Control
3, GridView Control
4, DetailsView Control
Solution 2
Which of the following uses a separate resource file for each culture?
1, Globalization
2, Implicit Localization
3, Explicit Localization
4, Localization
Solution 2
The public methods and properties of a master page can be accessed in a content page by assigning a class name to the master page. Which directive can be used to assign a class name to the master page?
1, <%@ Master %>
2, <%@ Page %>
3, <%@ MasterType %>
4, <%@ Control %>
Solution 1
Which of the following is NOT a feature of composite Web server controls?
1, They have a user interface that is composed of several custom Web server controls.
2, They derive from the System.Web.UI.WebControls.CompositeControls class.
3, They create the child controls by overriding the CreateChildControls method.
4, They are compiled into an assembly in the Bin folder before you deploy the application.
Solution 1
Repeater, DataList, and GridView Web server controls are examples of which type of controls?
1, User Controls
2, Custom Web server controls
3, Templated controls
4, Navigation controls
Solution3
Which of the following can be used to configure the way encryption is used to protect forms authentication cookies and view state information in a Web farm?
1, <trace>
2, <machineKey>
3, <customErrors>
4, <script>
Solution 2
Which of the following is a File Status displayed by the Copy Web Site tool?
1, Edited
2, Modified
3, Changed
4, Converted
Solution 3
How does the Copy Web tool make sure that all files on the local and remote sites are up to date?
1, By synchronizing the sites
2, By publishing the sites
3, By copying the new files in place of old files
4, By deploying the sites
Solution 1
Which of the following tags should be inserted into the Web.Config file to handle the mobile devices that do not accept relative URLs?
1, <httpRuntime> tag
2, <DeviceSpecific> tag
3, <Filter> tag
4, <deviceFilters> tag
Solution 1
What is the file extension of a Microsoft Windows Installer file that is used to distribute and install an application?
1, .exe
2, .msc
3, .msi
4, .jar
Solution 3
A mobile web page must contain at least one __________ tag.
1, <mobile:Form> tag
2, <mobile> tag
3, <MobileForm> tag
4, <IsMobileDevice> tag
Solution 1
While configuring profile properties in the Web.config file for an application which of the following tags defines name, type, and allow Anonymous attributes? What would be the extension of the skin file created with name MyTheme?
1,MyTheme.theme
2,MyTheme.aspx.theme
3,MyTheme.skin
4,MyTheme.aspx.skin
Solution 3
Which of the following objects is NOT a part of an ASP.NET theme?
1,StyleSheet
2,Skin Files
3,Supporting images
4,XML file
Solution 4
To apply an existing theme to the entire application, which of the following tags needs to be added in the Web.config file under the <System.Web> section?
1,<pages theme=”XXX”>
2,<profile theme=”XXX”>
3,<properties theme=”XXX”>
4,<configuration theme=”XXX”>
Solution 1
To enable users to personalize a page, you must set the Page.Theme property. During or before which event handler should this be done?
1,Page_PreRender ( )
2,Page_Load ( )
3,Page_PreInit ( )
4,Page_Render ( )
Solution 3
To use GDI+ objects, an object of the ________ class must be created.
1,SystemColors
2,Pen
3,Graphics
4,Image
Solution 3
The _______ class provides the primary access point for code to interact with the security system. 1,SecurityManagement
2,SecurityManager
3,PolicyLevel
4,CodeGroup
Solution 2
Asymmetric encryption is also known as _____________.
1,Private key encryption
2,Public key encryption
3,Public/Private key encryption
4,Protected key encryption
Solution 2
The ________ allows the .NET Framework to communicate with the COM component by providing a middle layer between your .NET Framework code and the COM
1,Interop assembly
2,Shared assembly
3,Multifile assembly
4,Private assembly
Solution 1
The primary class used to manage threads directly is the ______ class.
1,ThreadStart class
2,Thread Class
3,ParameterizedThreadStart class
4,ThreadPool class
Solution 2
–Nikhil Kumar
|
|
|
Mutually Exclusive Check Box Extender
In this article, I will show you step by step procedure, how to use a Mutually Exclusive Check Box Extender
In ASP.NET using Visual Studio 2005 or Visual Studio 2008.
The use of Mutually Exclusive Check Box Extender it that you can select only one check box under a heading…
To follow this code sample, you must use Visual Studio 2005 or Visual Studio 2008.
I have used <! – –> to comment HTML part of the code.
Note: Mutually Exclusive Check Box Extender is a part of AjaxControlToolkit.
To attach right click on the toolbox under Ajax Extensions and select Choose Items - > Browse Button - > select the AjaxControlToolkit.dll. If you are using Visual Studio 2008, you may not need AJAX Toolkit but if you are using Visual Studio 2005, you will need to download it from http://www.msdn.com/ or http://www.asp.net/.
Step 1. Start -> All Programs -> Visual Studio 2005 or Visual Studio 2008
Step 2. Now go to File Menu -> New -> Web Site
Step 3.
Under Visual Studio Installed Template-> Choose ASP.NET WEB SITE -> Choose File System from the location combo box -> Set the path by the browse button - > Choose the language from the Language ComboBox (Visual C# , Visual Basic , J #)
Choose Visual C#
Step 4. Click on the OK Button.
This is the source code window and in this page you will se this code.
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> <title>Type your webpage title here</title> <!– Here you can specify your page title in between title tag -> </head> <body> <form id=”form1? runat=”server”> <div>
<!– In between div tags you can manage your web controls like buttons, labels, picture Box, ImageMap etc –>
</div> </form> </body> </html> |
See here is a tab named Design in the bottom of this page.
Step 5. Click on this tab and you will see a blank web page where you can drag any control from the toolbox (which is in the left side of this window).
Step 6. Now drag some controls under the AJAX Extensions.
First control you are going to drag and drop on the page is - Script Manager.
first add a tag on the top of your source code window:
<%@ Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”cc1″ %>
Under the form tag,
Don’t be frustrate on seeing this code please read carefully it’s very simple.
|
<div> <asp:ScriptManager ID=”ScriptManager1″ runat=”server”> </asp:ScriptManager>
<asp:Panel ID=”Panel1″ runat=”server” BackColor=”LightSeaGreen”> <div><center>Choices…</center></div> <asp:Label ID=”label1″ runat=”server” Text=”Movies” Font-Bold=”true”/><br /> <br />
<asp:CheckBox ID =”CheckBox1″ runat=”server” Text=”Hollywood” /><br /> <asp:CheckBox ID =”CheckBox2″ runat=”server” Text=”bollywood” /> <br /> <br />
<asp:Label ID=”label2″ runat=”server” Text=”Food” Font-Bold=”true” /> <br /> <br /> <asp:CheckBox ID =”CheckBox3″ runat=”server” Text=”Indian” /> <br />
<asp:CheckBox ID =”CheckBox4″ runat=”server” Text=”South-Indian” /> </asp:Panel>
<c1:DropShadowExtender ID=”DropShadowExtender1″ runat=”server” Opacity=”0.1″ Radius=”10″ Rounded=”true” TargetControlID=”Panel1″ TrackPosition=”true” Width=”15″> </c1:DropShadowExtender>
<c1:MutuallyExclusiveCheckBoxExtender ID=”MutuallyExclusiveCheckBoxExtender1″ runat=”server” TargetControlID=”CheckBox1″ Key=”Movie”> </c1:MutuallyExclusiveCheckBoxExtender>
<c1:MutuallyExclusiveCheckBoxExtender ID=”MutuallyExclusiveCheckBoxExtender2″ runat=”server” TargetControlID=”CheckBox2″ Key=”Movie”> </c1:MutuallyExclusiveCheckBoxExtender>
<c1:MutuallyExclusiveCheckBoxExtender ID=”MutuallyExclusiveCheckBoxExtender3″ runat=”server” TargetControlID=”CheckBox3″ Key=”Food”> </c1:MutuallyExclusiveCheckBoxExtender>
<c1:MutuallyExclusiveCheckBoxExtender ID=”MutuallyExclusiveCheckBoxExtender4″ runat=”server” TargetControlID=”CheckBox4″ Key=”Food”> </c1:MutuallyExclusiveCheckBoxExtender>
</div> |
Step 7. Now run your web site by Ctrl + F5
OUT PUT
Step 8. When you run the Mutually Exclusive Check Box Extender will seem like this…
Now when you check a check box under the Movies heading then you can’t select the other check box means you can select only one check one under one heading…
Ex.__ if I select Hollywood then I can’t check Bollywood…
Step 9. Close Browser
Step 10. Close Visual Studio…
Thanks!
–Nikhil Kumar
|
|
|
Collapsible Panel Extender
In this article, I will show you step by step procedure, how to use a Collapsible Panel Extender
In ASP.NET using Visual Studio 2005 or Visual Studio 2008.
To follow this code sample, you must use Visual Studio 2005 or Visual Studio 2008.
I have used <! – –> to comment HTML part of the code.
Note: Collapsible Panel Extender is a part of AjaxControlToolkit.
To attach right click on the toolbox under Ajax Extensions and select Choose Items - > Browse Button - > select the AjaxControlToolkit.dll. If you are using Visual Studio 2008, you may not need AJAX Toolkit but if you are using Visual Studio 2005, you will need to download it from http://www.msdn.com/ or http://www.asp.net/.
Step 1. Start -> All Programs -> Visual Studio 2005 or Visual Studio 2008
Step 2. Now go to File Menu -> New -> Web Site
Step 3.
Under Visual Studio Installed Template-> Choose ASP.NET WEB SITE -> Choose File System from the location combo box -> Set the path by the browse button - > Choose the language from the Language ComboBox (Visual C# , Visual Basic , J #)
Choose Visual C#
Step 4. Click on the OK Button.
This is the source code window and in this page you will se this code.
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> <title>Type your webpage title here</title> <!– Here you can specify your page title in between title tag -> </head> <body> <form id=”form1? runat=”server”> <div>
<!– In between div tags you can manage your web controls like buttons, labels, picture Box, ImageMap etc –>
</div> </form> </body> </html> |
See here is a tab named Design in the bottom of this page.
Step 5. Click on this tab and you will see a blank web page where you can drag any control from the toolbox (which is in the left side of this window).
Step 6. Now drag some controls under the AJAX Extensions.
First control you are going to drag and drop on the page is - Script Manager.
first add a tag on the top of your source code window:
<%@ Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”cc1″ %>
Under the form tag,
Don’t be frustrate on seeing this code please read carefully it’s very simple.
|
<div> <asp:ScriptManager ID=”ScriptManager1″ runat=”server”> </asp:ScriptManager> <asp:LinkButton ID =”linkbutton1″ runat=”server” > About AJAX… </asp:LinkButton>
<asp:Label ID =”label1″ runat=”server” ></asp:Label>
<asp:Panel ID =”Panel1″ runat=”server” BackColor=”LightPink” ForeColor=”DarkSalmon” Font-Bold=”true”>
Microsoft has a complicated relationship with Ajax. On the one hand, the company wants to provide its existing ASP.NET developers with an easy way to implement Ajax functionality without having to learn JavaScript. On the other hand, Microsoft recognizes that the future is on the client. Therefore, it wants to provide web developers with the tools they need to build pure client-side Ajax applications. For these reasons, Microsoft has both a server-side Ajax framework and a client-side Ajax framework. If you want to retrofit an existing ASP.NET application to take advantage of Ajax, you can take advantage of Microsoft’s server-side Ajax framework. To take advantage of the serverside framework, you don’t need to write a single line of JavaScript code. You can continue to build ASP.NET pages with server-side controls in the standard way. You learn how to take advantage of the server-side Ajax framework in this chapter. The advantage of the server-side framework is that it provides existing ASP.NET developers with a painless method of doing Ajax. The disadvantage of the server-side framework is that it doesn’t escape all the problems associated with a server-side framework. You still have to run back to the server whenever you perform any client-side action. </asp:Panel> <cc1:CollapsiblePanelExtender ID=”CollapsiblePanelExtender1″ runat=”server” CollapseControlID=”linkbutton1″ ExpandControlID=”linkbutton1″ CollapsedSize=”0″ CollapsedText=”Expand it…” ExpandDirection=”Vertical” ExpandedSize=”250″ ExpandedText=”Colaspe it…” SuppressPostBack=”true” TargetControlID=”Panel1″ TextLabelID=”label1″> </cc1:CollapsiblePanelExtender> </div> |
Step 7. Now run your web site by Ctrl + F5
OUT PUT
Step 8. When you run the Collapsible Panel Extender will seem like this…
When you click on the “About AJAX “it will expand and when you click on the “About AJAX” again it will
Collapse again…
Step 9. Close Browser
Step 10. Close Visual Studio…
Thanks!
–Nikhil Kumar
|
|
|