TechDiag-A Technical Diagnostic
TechDiag(Technical Diagnosis) helps you to solve technical problems in software development and programming. Share knowledge with your friends and colleagues as find them interesting.
Sunday, August 14, 2011
Google Plus vs Facebook
Labels:
Facebook,
Google,
Google Plus
How to create CSS Rounded Corners Button
Most of the time a standard HTML style rectangular button works fine in our website. But sometime we need them to look fine and want to give them a rounded shape like the buttons created in flash tool.
So here it's. It's easier than you think with the help of CSS. Look at some of the stylish buttons below created in simple HTML and CSS applied on them.
Code:
<input type=button style="border-radius: 11px 11px 11px 11px; padding:10px; background-color:DarkOliveGreen; color:white" value="Rounded Button 1">
Code:
<input type=button style="border-radius: 100px 0px 30px 0px; padding:10px; background-color:DarkOliveGreen; color:white" value="Rounded Button 2">
Code:
<input type=button style="border-radius: 100px 0 100px 0; padding:10px; background-color:DarkOliveGreen; color:white" value="Rounded Button 3">
Code:
<input type=button style="border-radius: 0px 100px 0 100px; padding:10px; background-color:DarkOliveGreen; color:white" value="Rounded Button 4">
Code:
<input type=button style="border-radius: 120px 120px 120px 120px; padding:2px; background-color:DarkOliveGreen; color:white" value=">>">
The CSS attribute used here for this purpose is border-radius
So here it's. It's easier than you think with the help of CSS. Look at some of the stylish buttons below created in simple HTML and CSS applied on them.
Code:
<input type=button style="border-radius: 11px 11px 11px 11px; padding:10px; background-color:DarkOliveGreen; color:white" value="Rounded Button 1">
Code:
<input type=button style="border-radius: 100px 0px 30px 0px; padding:10px; background-color:DarkOliveGreen; color:white" value="Rounded Button 2">
Code:
<input type=button style="border-radius: 100px 0 100px 0; padding:10px; background-color:DarkOliveGreen; color:white" value="Rounded Button 3">
Code:
<input type=button style="border-radius: 0px 100px 0 100px; padding:10px; background-color:DarkOliveGreen; color:white" value="Rounded Button 4">
Code:
<input type=button style="border-radius: 120px 120px 120px 120px; padding:2px; background-color:DarkOliveGreen; color:white" value=">>">
The CSS attribute used here for this purpose is border-radius
Saturday, August 6, 2011
ASP.NET Interview Questions related to Master Pages, ASP.Net Page Life Cycle, Ajax, Jquery, Json, Web Service
Interview Questions
It's harder to find appropriate interview questions than being answered on internet. So I am writing my most recently asked questions in an ASP.Net Interview. If you need to get the answer of any of the following questions write me in comments.
- How to change master page of a content page dynamically?
- Why to change Masterpage of a page in Page_PreInit() function ?
- What is the maximum limit of parameters we can pass to a stored procedure ?
- How can we change current theme of a page at Page_PreInit() from master page?
(in fact Page_PreInit() is not possible from master page. So the question is asked just to make confusion.)
- What is DOM and whats its purpose ?
- In normal cases, if an Insert button is double clicked by a user what will happen? Will it make insertion twice or a normal insertion will happen?
- AJAX stands for?
- What are multicast delegates ?
- What is a window service? How to register a window service? How to uninstall a window service ?
- I have a check box and a textbox and I have a asp.net validator for that textbox but i want it to be only validated only when checkbox is checked. How can I do that?
- What are transformation services?
- What is a web service ?
- Is web service plateform independent?
- Describe ASP.NET Page Life Cycle.
- What are design patterns ?
- What is singleton pattern ?
- Define JQUERY
- What is JSON?
- What is LINQ ?
- What is ASP.NET UpdatePanel?
Labels:
Ajax,
ASP.NET,
Interview Questions,
JQuery
ASP.NET Ajax Extension Script Manager
In order to use ASP.NET AJAX you need to add ScriptManager to your webpage. This control is the brain of ASP.NET AJAX.
You can add it from ToolBox tabnamed AJAX Extensions. The source of this control is as below:
< asp:ScriptManager ID="ScriptManager1" runat="server" >< / asp:ScriptManager >
This control add links to ASP.NET AJAX libraries in your page. The output of this looks something like:
< Script src="/YourWebSite/ScriptResource.axd?d=RUSU1mI......" type="text/javascript" >< /Script >
It brings the JavaScript code using 'src' attribute. Rather than adding extra javascript files, the src attribute points to ScriptResource.axd. ScriptResource.axd is not an actual file. It tells ASP.NET to find Javascript file in one of the compiled .Net assemblies. The query string arguments tells ScriptResource.axd extension the file to be sent to the browser.
Every page that uses ASP.NET AJAX requires an instance of the ScriptManager. However, you can only use one ScriptManager on a page. ASP.NET AJAX-enabled controls can interact with the ScriptManager, directing it to link to additional Javascript files.
It's recommended that you add ScriptManager to master pages of the website. However, different content pages may require different settings of the properties of ScriptManager. The solution to this requirement is to add ScriptManager to master page and then add ScriptManagerProxy to the content pages. This ScriptManagerProxy can be configured in the same way as ScriptManager on the page.
The Javascript files used by ASP.NET AJAX contains thousands of complex lines that forms the bases of all Ajax functionalities. These files are ver compant not more than 200 KB, depending on the features being used on the page. This code is downloaded only once and then cached by the browser for later use. Also ASP.NET sends a compressed version of script in case the browser supports it. Thus Ajax enabled web pages do not require a longer download time.
You can add it from ToolBox tabnamed AJAX Extensions. The source of this control is as below:
< asp:ScriptManager ID="ScriptManager1" runat="server" >< / asp:ScriptManager >
This control add links to ASP.NET AJAX libraries in your page. The output of this looks something like:
< Script src="/YourWebSite/ScriptResource.axd?d=RUSU1mI......" type="text/javascript" >< /Script >
It brings the JavaScript code using 'src' attribute. Rather than adding extra javascript files, the src attribute points to ScriptResource.axd. ScriptResource.axd is not an actual file. It tells ASP.NET to find Javascript file in one of the compiled .Net assemblies. The query string arguments tells ScriptResource.axd extension the file to be sent to the browser.
Every page that uses ASP.NET AJAX requires an instance of the ScriptManager. However, you can only use one ScriptManager on a page. ASP.NET AJAX-enabled controls can interact with the ScriptManager, directing it to link to additional Javascript files.
It's recommended that you add ScriptManager to master pages of the website. However, different content pages may require different settings of the properties of ScriptManager. The solution to this requirement is to add ScriptManager to master page and then add ScriptManagerProxy to the content pages. This ScriptManagerProxy can be configured in the same way as ScriptManager on the page.
The Javascript files used by ASP.NET AJAX contains thousands of complex lines that forms the bases of all Ajax functionalities. These files are ver compant not more than 200 KB, depending on the features being used on the page. This code is downloaded only once and then cached by the browser for later use. Also ASP.NET sends a compressed version of script in case the browser supports it. Thus Ajax enabled web pages do not require a longer download time.
How to Ajax
Labels:
Ajax,
ASP.NET,
ScriptManager
Saturday, July 30, 2011
Gmail, Yahoo, Hotmail Attachment Size Limit
Email Attachment Size Limit
Email service has provided us a great advantage over our traditional communication services. But almost all the email service providers have imposed some limitations and restrictions like gmail, yahoo and hotmail as the well known mail server.We must understand the maximum size of an attachment before sending an email attachment.
Gmail Attachment Size: 20MB
Yahoo Attachment Size: 20MB
Hotmail Attachment Size: 10MB
And even then if you want to send a larger file as required sometime you can use some other alternatives. For example using yousendit.com you can send upto 2GB of file.
ASP.Net Restricted File Types
ASP.Net Hidden File Type Restricted File Types
ASP.Net stops you from requesting certain file types and authomatically provides a certain level of security to your configuration and source code files. This is accomplished by registering the file types with IIS and are assigned to HttpForbidderHandler class. This class has the role to simply deny all the requests it receives.Thus ASP.Net blocks access to Visual Studio project files, Source Code files and some other resources like:
.cs file (C# files)
.vb file (VB.Net files)
.config file (configuration files like web.config file)
.ascx file (ASP.Net user controls)
.vbproj file (VB.Net project file)
.csproj file (C# Project file)
.asax file (Global.asax file containing global.asax events)
.resx file (resource file format consisting of XML entries)
.resources file (specifically designed to create .resources files)
For further details your can refer to web.config.default file in
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Config folder
and find the textSystem.Web.HttpForbiddenHandler
Labels:
ASP.NET
Subscribe to:
Comments (Atom)



