.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

How can we register a custom server control to a web page ?

Posted By :Kirtan     Posted Date :June 30, 2010    Points :10   Category :.NET Framework 
we can register a custom server control to a web page using

@Register directive

You can also find related Interview Question to How can we register a custom server control to a web page ?  below: 

What is different between Web User Control and in Web Custom Control?

  
Web user controls : Web User Control is Easier to create and another thing is that its support is limited for users who use a visual design tool one gud thing is that its contains static layout one more thing a seprate copy is required for each application.

Web custom controls: Web Custom Control is typical to create and gud for dynamic layout and another thing is it have full tool support for user and a single copy of control is required because it is placed in Global Assembly cache. (More...)

What are the differences between web part page gallery, site gallery,Virtual server gallery and online gallery in SharePoint?

  
Web Part Page Gallery in SharePoint is the default gallery provided by Microsoft that comes installed with SharePoint. Site Gallery is specific to one sharepoint website site. Virtual Server gallery is specific to that virtual server and online gallery is available for download web parts from MSDN. (More...)

Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?

  
AsyncPostBackTimeout Property needs to set which gets or sets a value that indicates the time, in seconds, before asynchronous postback time out if no response is received from the server.




The default value of this property is 90 second. We can also set the user defined error message using asyncpostbackerrormessage property (as shown in above code) for time out. (More...)

Difference Between User Control and Custom Control In Asp.Net?

  
User Controls: We need to implement with Predefined Functionality with Available Properties

Web User Controls:Web User Controls Implements Customized Properties and Customized Methods,we can develop any control with User defined Properties








(More...)

How to use a user control in a Web Forms page

  
Declare the @ Register directive.

For example, use the following code.
<%@ Register TagPrefix="UC" TagName="TestControl" Src="test.ascx" %>
(More...)

How to create an instance of a user control programmatically in the code behind file of a Web Forms page

  
Create a new Web Forms page in Visual Studio.
Navigate to the code behind file generated for this Web Forms page.
In the Page_Load event of the Page class, write the following code.
// Load the control by calling LoadControl on the page class.
Control c1 = LoadControl("test.ascx");

// Add the loaded control in the page controls collection.
Page.Controls.Add(c1);

(More...)

Difference between Server.Transfer and Cross Page Posting

  
In 'Server.Transfer', the URL doesn't change whereas in cross page posting, the form is submitted to a different page, thereby changing the url.
The Server.Transfer method is a server-based operation whereas cross-page postback is a client-based transfer. (More...)

What are the differences between web part page gallery, site gallery,Virtual server galleryand online gallery?

  
Web Part Page Gallery is the default gallery that comes installed with SharePoint. Site Gallery is specific to one site. Virtual Server gallery is specific to that virtual server and online gallery are downloadable web parts from Microsoft. (More...)

How will you add Code behind to a Custom Applictaion Page or a Layout Page in SharePoint?

  
Ans. You do not deploy a code behind file with your custom Layouts page. Instead, you can have the page inherit from the complied dll of the solution to access the code behind. (More...)

Q. How will you add Code behind to a Custom Applictaion Page or a Layout Page in SharePoint?

  

Ans. You do not deploy a code behind file with your custom Layouts page. Instead, you can have the page inherit from the complied dll of the solution to access the code behind.
(More...)

Q. Can we use our custom master page with the application pages in SharePoint 2010 ?

  

Ans. With 2010, you can now set whether the pages under _Layouts use the same Master Page as the rest of your site. You can enable or disable this functionality through the web application settings in Central Administration. This however, is not applicable to your custom application pages. If you want your custom applictaion page to inherit the site master page you must derive it from Microsoft.SharePoint.WebControls.LayoutsPageBase class.
(More...)

Q. Can we use our custom master page with the application pages in SharePoint 2010 ?

  
Ans. With 2010, you can now set whether the pages under _Layouts use the same Master Page as the rest of your site. You can enable or disable this functionality through the web application settings in Central Administration. This however, is not applicable to your custom application pages. If you want your custom applictaion page to inherit the site master page you must derive it from Microsoft.SharePoint.WebControls.LayoutsPageBase class.

(More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend