In this article i am going to explain How to get/fetch/read current page URL/Address in asp.net using C#.
Here is C#.Net Code to get current page URL/Address in asp.net.
if your page full url is http://example.com/Default.aspx
Here is C#.Net Code to get current page URL/Address in asp.net.
if your page full url is http://example.com/Default.aspx
1-Response.Write(Request.RawUrl);
its output will be : /Default.aspx
2-Response.Write(HttpContext.Current.Request.Url.AbsolutePath);
its output will be : /Default.aspx
3-Response.Write(Request.Url);
its output will be : http://example.com/Default.aspx
4-Response.Write(HttpContext.Current.Request.Url);
its output will be : http://example.com/Default.aspx
5-
Response.Write(Request.Url.AbsoluteUri);
its output will be : http://example.com/Default.aspx
6- Response.Write(HttpContext.Current.Request.Url.AbsoluteUri);
its output will be : http://example.com/Default.aspx
Active Server Pages or Classic ASP, as it is more commonly
known, is Microsoft's first server side scripting engine that enables you to
make dynamic and interactive web pages.
Classic ASP uses server-side scripting to dynamically
produce web pages that are not affected by the type of browser the website
visitor is using.
The default scripting language used for writing ASP is
VBScript, although you can use other scripting languages like JScript
(Microsoft's version of JavaScript).
When a browser requests an ASP Page, the Web server
generates a page with HTML code and sends it back to the browser.Any web pages
containing ASP cannot be run by just simply opening the page in a web browser.
The page must be requested through a web server that supports ASP, this is why
ASP stands for Active Server Pages, no server, no active pages.
This interview section questions contains a brief introduction to the ASP.Net interview Questions in ASP.NET,C#.NET,SQL Server,.NET Framework .NET. The most common question for experience persons .This is Asp.Net Interview Question Part 1.
Here you will get ASP.NET - .NET Interview Questions and Answers.
1. What is ASP?
2. What is ASP.NET?
3. What is the basic difference between ASP and ASP.NET?
4. In which event are the controls fully loaded?
5. How can we identify that the Page is Post Back?
6. What is the lifespan for items stored in ViewState?
7. How information about the user's locale can be accessed?
8. What is the difference between SQL notification and SQL invalidation?
9. Which is the parent class of the Web server control?
10. Can you set which type of comparison you want to perform by the CompareValidator control?
11. What is the behavior of a Web browser when it receives an invalid element?
12. What are the advantages of the code-behind feature?
13. How do you sign out from forms authentication?
14. What is AutoPostBack?
15. What is the function of the ViewState property?
16. Why do you use the App_Code folder in ASP.NET?
17. Define a multilingual Web site.
18. What is an ASP.NET Web Form?
19. What is the difference between a default skin and a named skin?
20. What is IIS? Why is it used?
21. What is Query String? What are its advantages and limitations?
22. What is actually returned from server to the browser when a browser requests an .aspx file and the file is displayed?
23. How can you display all validation messages in one control?
24. Which two new properties are added in ASP.NET 4.0 Page class?
25. What is tracing? Where is it used?
26. What is the difference between authentication and authorization?
27. How can you register a custom server control to a Web page?
28. Which ASP.NET objects encapsulate the state of the client and the browser?
29. Differentiate globalization and localization.
30. What is ViewState?
31. Which method is used to force all the validation controls to run?
32. Which method has been introduced in ASP.NET 4.0 to redirect a page permanently?
33. How can you send an email message from an ASP.NET Web page?
34. What is the difference between the Response.Write() and Response.Output.Write() methods?
35. What does the Orientation property do in a Menu control?
36. Differentiate between client-side and server-side validations in Web pages.
37. How does a content page differ from a master page?
38. Suppose you want an ASP.NET function (client side) executed on the MouseOver event of a button. Where do you add an event handler?
39. What is the default timeout for a Cookie?
40. What are HTTP handlers in ASP.NET?
41. What are the events that happen when a client requests an ASP.NET page from IIS server?
42. Explain file-based dependency and key-based dependency.
43. How can you implement the postback property of an ASP.NET control?
44. Explain how Cookies work. Give an example of Cookie abuse.
45. Explain login controls.
46. What is the use of PlaceHolder control? Can we see it at runtime?
47. What are the event handlers that can be included in the Global.asax file?
48. What is the difference between page-level caching and fragment caching?
49. Describe the complete lifecycle of a Web page.
50. How can you assign page specific attributes in an ASP.NET application?
51. Which method is used to post a Web page to another Web page?
52. What is a Cookie? Where is it used in ASP.NET?
53. What are Custom User Controls in ASP.NET?
54. What does the .WebPart file do?
55. How can you enable impersonation in the web.config file?
56. How can you identify that the page is PostBack?
57. In which database is the information, such as membership, role management, profile, and Web parts personalization, stored?
58. What is State Management? How many ways are there to maintain a state in .NET?
59. What do you understand by aggregate dependency?
60. How can you ensure that no one has tampered with ViewState in a Web page?
61. What is the difference between adding items into cache through the Add() method and through the Insert() method?
62. Explain the cookie less session and its working.
63.What is a round trip?
64.What are the major built-in objects in ASP.NET?
65.Where should the data validations be performed-at the client side or at the server side and why?
67.Why do we need nested master pages in a Web site?
68.How can you dynamically add user controls to a page?
69.What is the appSettings Section in the web.config file?
70.What type of code, client-side or server-side, is found in a code-behind file of a Web page?
71.To which class a Web form belongs to in the .NET Framework class hierarchy?
72.What does the "EnableViewState" property do? Why do we want it On or Off?
73.Which event determines that all the controls are completely loaded into memory?
74.What is the function of the CustomValidator control?
75.What is Role-based security?
76.Which data type does the RangeValidator control support?
77.What are the HTML server controls in ASP.NET?
78.Where is the ViewState information stored?
79.Why a SiteMapPath control is referred to as breadcrumb or eyebrow navigation control?
80.Where is the ViewState information stored?
81.Which namespaces are necessary to create a localized application?
82. What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control?
83. What is the difference between HTML and Web server controls?
84. Explain the AdRotator Control.
85. What is the difference between absolute expiration and sliding-time expiration?
86. What is the code-behind feature in ASP.NET?
87.How can you check if all the validation controls on a Web page are valid and proper?
88.Explain the validation controls. How many validation controls in ASP.NET 4.0?
89.What is difference between a Label control and a Literal control?
90.How many types of Cookies are available in ASP.NET?
91.What is the use of the Global.asax file?
92.What are the Culture and UICulture values?
93.What is the difference between ASP session and ASP.NET session?
94.Which control will you use to ensure that the values in two different controls match?
95. What is the difference between a page theme and a global theme?
96.What do you mean by a neutral culture?
97.What is the use of the <sessionState> tag in the web.config file?
98.Can you post and access view state in another application?
99.Which method do you use to kill explicitly a users session?
100.Which class is inherited when an ASP.NET server control is added to a Web form?
101.What events are fired when a page loads?
102.Write three common properties of all validation controls.
103.What are navigation controls? How many navigation controls are there in ASP.NET 4.0?
104.What are server-side comments?
105.How do you prevent a validation control from validating data at the client end?
106.What is cross-page posting in ASP.NET?
107.Explain the Application and Session objects in ASP.NET.
108.How will you differentiate a submaster page from a top-level master page?
109.What is the difference between a HyperLink control and a LinkButton control?
110.What are the various ways of authentication techniques in ASP.NET?
111.What are the different ways to send data across pages in ASP.NET?
112.What do you mean by the Web Part controls in ASP.NET?
113.What is the use of web.config? What is the difference between machine.config and web.config?
114.Explain the concept of states in ASP.NET.
Asp.Net Interview Questions,
Answer 1
When you are applying any theme to a page, then by default the Default skin applies to all controls of same type to that page. This skin is default for a control if it does not have SkinID attribute. Suppose you create a default skin for a Calendar control, then the control skin applies to all Calendar controls on pages that use the theme.
But the named skin controls have their SkinID property. It is not applying skin attributes automatically for controls by type, but it facilitates to apply explicitly a named skin to a control by changing the control's SkinID property. It allows you to set different skins for different instances of the same control in an application.
Answer 2
The default skin is applied to all the Web server controls in a Web form, which are of similar type, and it does not provide a Skin ID attribute. The named skin provides a Skin ID attribute and users have to set the Skin ID property to apply it.
Tags:ASP.NET interview questions and answers Interview Questions in ASP.NET,C#.NET,SQL Server,.NET.
SharePoint 2010 Tutorials For Beginners Lession 1
This beginner tutorial explains how to log into SharePoint, add new sites, edit themes, and create and edit lists and columns in SharePoint 2010.
SharePoint 2010 Tutorials For Beginners Lession 2
This beginner tutorial explains how to add Users, add Views, and reviews how to create and edit Lists and Columns in SharePoint 2010.
SharePoint 2010 Tutorials Lession 2 Part-A
SharePoint 2010 Tutorials Lession 2 Part-B
SharePoint 2010 Tutorials For Beginners Lession 3
This beginner tutorial explains how to create and use Document Libraries and how to use Versioning and Check-In/Check-Out.
SharePoint 2010 Tutorials Lession 3 Part-A
SharePoint 2010 Tutorials Lession 3 Part-B
SharePoint 2010 Tutorials For Beginners Lession 4 : Introduction to Web Parts
This beginner turorial is a guide to creating and using Web Parts in SharePoint 2010.
SharePoint 2010 Tutorials For Beginners Lession 5 : Introduction to SharePoint Roles, Groups, and Permissions
This beginner tutorial explains basic user security including authorization and authentication, permissions, active directory, groups, and inheritance in SharePoint 2010.
SharePoint 2010 Lesson 5 - Part A - SharePoint Roles, Groups, and Permissions
SharePoint 2010 Lesson 5 - Part B - SharePoint Roles, Groups, and Permissions -This beginner tutorial explains basic user security including authorization and authentication, permissions, active directory, groups, and inheritance in SharePoint 2010.
SharePoint 2010 Tutorials For Beginners Lesson 6 - Document Management - Site Columns
This tutorial discusses what site column definitions are and how to use them in SharePoint 2010.
SharePoint 2010 Tutorials For Beginners Lesson 7 - Document Management - Content Types
This tutorial discusses content types and information management in SharePoint 2010.
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
This tutorial discusses content types and information management in SharePoint 2010.
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
This tutorial discusses what site column definitions are and how to use them in SharePoint 2010.
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
This beginner tutorial explains basic user security including authorization and authentication, permissions, active directory, groups, and inheritance in SharePoint 2010.
SharePoint 2010 Lesson 5 - Part A - SharePoint Roles, Groups, and Permissions
SharePoint 2010 Lesson 5 - Part B - SharePoint Roles, Groups, and Permissions -This beginner tutorial explains basic user security including authorization and authentication, permissions, active directory, groups, and inheritance in SharePoint 2010.
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
This beginner turorial is a guide to creating and using Web Parts in SharePoint 2010.
SharePoint 2010 Tutorials Lession 4
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
This beginner tutorial explains how to create and use Document Libraries and how to use Versioning and Check-In/Check-Out.
SharePoint 2010 Tutorials Lession 3 Part-A
SharePoint 2010 Tutorials Lession 3 Part-B
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
This beginner tutorial explains how to add Users, add Views, and reviews how to create and edit Lists and Columns in SharePoint 2010.
SharePoint 2010 Tutorials Lession 2 Part-A
SharePoint 2010 Tutorials Lession 2 Part-B
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
This beginner tutorial explains how to log into SharePoint, add new sites, edit themes, and create and edit lists and columns in SharePoint 2010.
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
In this video we will understand what is sharepoint 2010 , differences between sharepoint foundation and sharepoint server 2010 and finally we will try to understand the different software and hardware requirements for sharepoint 2010.
Tags:Sharepoint 2010 Object model Tutorial,SharePoint 2010,SharePoint 2007, SharePoint 2010 SharePoint Development, 2013, 2010, 2007,Portal Technology, SharePoint Server 2010, Architecture of SharePoint Server 2010 SharePoint 2010 Developer tutorial
Authentication is the process where we identify who the user is.Authorization is the process where we check what kind of role and rights the identified user has. Below is the video which describes these two vocabularies in a precise manner.