Converting Web Pages to User Controls in .NET

There are instances where you would like to use web page functionality repeatedly within your application and you might want to convert it to a user control so that you can do so. It is easy to convert a web page to a user control with some minor modifications in it.

As you know the user control files have an extension .ascx, you have to change the file extension of the web page to that of .ascx. For this you can use the Rename functionality found in the context menu from the Solution Explorer.

After renaming the file, you have to remove the html, body, and the form tags found in the web page. Now coming to the top of the page, you will have the @page directive. Now change the @page directive to a @control directive.

The attribute like language, AutoEventWireup, CodeFile and Inherits can be left as it is. Add an attribute called className to the @control directive and give a ClassName. Now you are ready to use this user control in the web page of your choice.


Microsoft slams Google user data policy in new ads
Microsoft Corp. slammed search rival Google Inc. with full-page newspaper ads Wednesday, saying that recent changes at Google that allow it to internally merge the data it collects on user activity across services such as YouTube and Gmail are meant to allow advertisers to better target customers.

PWM Motor Driver IC minimizes switching power losses.
Supplied in 24-pin surface-mount SOIC with 2 pairs of batwing leads, Model A4970 utilizes DMOS output technology that drives windings of bipolar stepper motor or bidirectionally controls 2 DC motors. Both bridges can sustain 45 V and include internal PWM control of output current to 750 mA. For PWM current control, max output current is determined by user selection of reference voltage and ...

Google Clarifies Privacy Policy Consolidation, Claims It's Not Changing Controls
Google responds to concerns that its March move to a single, unifying privacy policy for all its services is a bait-and-switch.




______________________________________________________

Recommended Resource



| Converting Web Pages to User Controls in .NET | .Working on .NET User Controls | Overview of ASP.NET User Controls | Web User Controls - Creation and Implementation | Advantages of using User Controls in ASP.NET | Re-usability of User Controls in ASP.NET | Personalizing Web Application by Creating User Controls in .NET | Customizing your Application with VB.net User Controls | Building User Controls in ASP.NET | Examples of User Controls in VB.NET | Example of C# User Controls | Where to use Visual Basic User Controls | Working on User Interface Controls | Creating Dynamic User Controls | Understanding VB .NET User Controls | Creating User Controls VB.NET | How to load user controls dynamically |



_______________

FREE Subscription

Stay Current With the Latest Technology Developments Realted to .NET. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.


 

| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |