473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

problem creating a custom control

I'm creating an 'owner drawn ASP.NET control' where all the HTML tags are
written in the Render() method.
In this control there would be 2 links: Edit & Comment.
I would like to use a <A HREF='...'>
But in the HREF tag I would like to write the special URL which will call:
RaisePostBackEvent(string eventArgument)

with an 'eventArgument' of my choosing.
However I have no idea what that should be!

Looking at what's generated by LinkButtton I guess it's something like:
"javascript:__doPostBack('{UniqueId}','myArgument' )"

But I wonder if there was a framework method to create this URL instead of
hard coding it directly myself...
Dec 31 '05 #1
1 1045
found it!
Page.GetPostBackClientHyperlink(this, "edit")
"Lloyd Dupont" <net.galador@ld> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
I'm creating an 'owner drawn ASP.NET control' where all the HTML tags are
written in the Render() method.
In this control there would be 2 links: Edit & Comment.
I would like to use a <A HREF='...'>
But in the HREF tag I would like to write the special URL which will call:
RaisePostBackEvent(string eventArgument)

with an 'eventArgument' of my choosing.
However I have no idea what that should be!

Looking at what's generated by LinkButtton I guess it's something like:
"javascript:__doPostBack('{UniqueId}','myArgument' )"

But I wonder if there was a framework method to create this URL instead of
hard coding it directly myself...

Dec 31 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: anand | last post by:
Hi all, I have created a custom control which displays Image using Graphics.. I am using this control in a different windows application. I am dynamically creating the control and putting that...
0
by: Scott Yenor | last post by:
Hello, I am writing a control library that has a control that inherits from System.Web.UI.Control. The control works fine and I am able to loop through the child controls and display everything...
0
by: Ravi Ambros Wallau | last post by:
Hi: I've created a custom control - a grid that uses Infragistics to display some filters, the grid itself, and some buttons. Well, when using this control directly on WebForm, everything works...
2
by: Fred Flintstone | last post by:
This is driving me crazy. I've put together a perfect, easy example of the problem. What I'm doing is creating a custom control, prepopulated with 4 items when dropped on a form: - Create a new...
7
by: Dino Buljubasic | last post by:
Hi, I am using C# 2.0 (VS2005) to build my user control that contains a number of dynamically loaded ListViews. ListViewItems have their ForeColor properties set to either black or blue to...
2
by: Radu | last post by:
Hi. I am creating a user control in vs2005 which is supposed to provide a fancy gradient background - in theory, you just drop it on a form, you set the start/end colors, the gradient type, and...
2
by: shapper | last post by:
Hello, I have a master page where my form has the Runat="server". The master page as a control place holder, named "cphContent". Then in a page which inherits from the master page I added a...
14
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using VS2005 and .net 2.0. I'm creating an application that has 3 forms. I want allow users to move forward and backward with the forms and retain the data users have entered. I thought...
7
by: =?Utf-8?B?YnJhaW5mdWVsbWVkaWE=?= | last post by:
Can anyone point me in the direction of creating a custom listview item? I guess the other question then - is this possible? I want to create a list of listview items comprised each comprised of...
1
by: deepapanch | last post by:
Hi All: I am new to C#. Have created a simple outlook add-in, which adds a command bar in Outlook. On click of the button, I would like to load the a simple dialog with a Text Box and a...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.