ASP.NET Interview Questions and Answers (1544) - Page 67

What parameters Appsetting allowed in definition?

Appsetting has key and value pairs where keys will be accessed in code-behind to get their's values.Appsettings is the best place to store Connection string,global variables,file paths and so on.
How to validate a TextBox that it should not accept null values?

The RequiredFieldValidator control is introduced in Dot Net 1.0 and is a validation control used to make an input control a required field.

For Example:-
<asp:TextBox runat = "server" Id = "txt_name" />

<asp:RequiredFieldValidator runat="server" Id="req_name" ControlToValidate = "txt_name" ErrorMessage = "Text box can not be empty" />

How to show a paragraph in Asp.Net Pages?

We have <p> </p> in-built HTML tag which is used for writing Paragraph.We can write any contents/blogs inside <p></p> tag.

For Example:-
<p style="back-ground-color:yellow;">

Dot Net Funda website
</p>

<p style="back-ground-color:palegreen;">
Dot Net Funda website
</p>

How to give a line break in-between controls in Asp.net pages?

We have <BR/> tag which is used for giving Line Breaks in-between controls.It's just like \r\n in windows application.

For Example:-
<asp:button id = "btn1" runat = "server" text = "Button1"/>

<br/>
<asp:button id = "btn2" runat = "server" text = "Button2"/>
<br/>
<p>
Hello World
</p>

How do you implement SSL?

1. create certificate request
[
=>Right click on the website (VD)
=>Click Directory Security Tab and click Server Certificate
=> Type name of certificate , Organization name , server name
location info,
=> Type the path need to save certificate information Submit certificate request.
]
What do we mean by Border property in CSS?

The border is an in-built CSS property which is used for setting element's or control's border to bold,setting the border color etc..

Syntax:
border:border-width border-style border-color;

What are the orders of Border properties in CSS?

Border properties should be in the following order if they are being applied in the elements.

1). border-width
2). border-style,and
3). border-color.
Give an example of Border property in CSS?

Suppose i have a Button control whose border i have to set,so i will write,

<asp:Button ID="Button1" runat="server" Text="Button" style="border:1px solid green;"/>

Or we can apply border to any element like below code,
<div style="border:1px solid green;">Dotnet funda.com</div>

What do we ment by border-width CSS property?

It's an in-build CSS property used for setting border width of any controls and comes under border property.It has the for borders i.e. top,left,right and bottom.

For Example:
p

{
border-width:2px;
}


Here,P is the paragraph.
What are the values available for border-width property?

We have following values available for border-width property :-

1). Medium
2). Thick and,
3). Thin
What is the default value of border-width property?

Medium is the default value.If we do not provide border-width property to an element or control,then by-default it takes Medium value.
What does border-width:thin medium thick 10px mean?

border-width:thin medium thick 10px mean:-
top border is thin
right border is medium
bottom border is thick
left border is 10px
What does border-width:thin medium thick mean?

border-width:thin medium thick mean:-
top border is thin
right and left borders are medium
bottom border is thick
What does border-width:thin medium mean?

border-width:thin medium mean:-

top and bottom borders are thin
right and left borders are medium
What does border-width:thin mean?

border-width:thin mean all four borders are thin i.e. top,bottom,left and right borders will be Thin.
What does border-width:1px 2px 3px 4px mean?

border-width:1px 2px 3px 4px mean:-

top border is 1px
right border is 2px
bottom border is 3px
left border is 4px
What do we mean by border-style CSS property?

border-style is a in-built CSS property which specifies the style of an element's complete border i.e. top,bottom,left and right.
In other words,we can say that,the border-style property is used to apply the style of a control's or element's borders.

For Example:-
div

{
border-style:solid;
}

p
{
border-style:solid;
}

What are the options available in border-style CSS property?

There are lots of options available few are listed below:

Inset:- It is opposite of Outset.Specifies a 3D inset border. The effect depends on the border-color value provided.
Outset:- It is opposite of Inset.Specifies a 3D outset border. The effect depends on the border-color value provided.
Hidden:- This value is used with tables. It's same as "none".
Groove:- It specifies a 3D grooved border.The effect depends on the border-color value provided.
Ridge:- Patterned border that is supposed to represent an embossed ridge opposite of groove).Renders differently in different browsers.Specifies a 3D ridged border. The effect depends on the border-color value.
What do we mean by Solid border-style CSS property?

It specifies a solid line or solid border to any element or control border.

Syntax:-
border-style:solid;


For Example:-
<asp:Button ID="Button2" runat="server" Text="Button"  style="border-style:solid;"/>

What do we mean by Dotted border-style CSS property?

Dotted property has a series of dots on the border of any controls or elements or it specifies a dotted border on the element's border.

Syntax:-
border-style:dotted;


For Example:-
<asp:Button ID="Button2" runat="server" Text="Button" style="border-style:dotted;"/>

<div style="border-style:dotted;">Hello</div>

Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories