Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2006, 05:40 AM
Registered User
 
Join Date: Jul 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Custom control writing properties to ASPX- Page

Hi,

Is there any possibility to create a new (custom) control named MyGridView, which creates it one PagerTemplate and writes this to the ASPX- File?

So I want to drag it out of the toolbox and after a switch to the code view I want to see this:

<asp:MyGridView ID="GridView1" runat="server">
<PagerTemplate>
<asp:LinkButton ID="nextKunde" AccessKey="N" ForeColor="red" Text="Weiter" runat="server" CommandName="Page" CommandArgument="Next"/>
</PagerTemplate>
</asp:MyGridView>

Thx for you replies...

 
Old July 14th, 2006, 07:55 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The easiest things to do is select this code, and drag it on the toolbar. This creates a code snippet that you can give a useful name. Next time you drag it from the toolbar (or double click it), you'll get the exact same code again.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
custom control inside custom control issues StevesonD ASP.NET 2.0 Professional 1 February 19th, 2008 06:54 PM
Reference Page Control from Custom Class wirerider ASP.NET 2.0 Professional 6 February 1st, 2006 07:45 PM
Change TextBox control location on aspx page minhpx General .NET 2 March 4th, 2005 08:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.