473,385 Members | 1,769 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,385 software developers and data experts.

Web User Control - calls to server side code

I know, of course that client side stuff cant call server code
directly. What I am doing is putting in a basic LeftHand menu bar
using a user control that contains a datagrid composed of linkbutton
controls. I am populating this either manually (one item at a time
programatically) or via a DataBind to a database table.

How do I link the items to server side code methods? If I had created
the link buttons manually on the page, they would be tied code with
even handlers on their click events dynamically. Im wondering how I
would go about defining this event handler knowing....

A. Visible text for menu item.
B. The name of the method in code that should be called as a result of
clicking on the menu item.

I want to be able to generate all the code to take care of the menu as
I build it, or when I call Databind.

TIA
Nov 18 '05 #1
1 1711
the datagrid among other controls supports templates where you can specify
an event handler that you have and pass it values if you want like say the
value of column 2 in the current row in the dataset that you are binding the
datagrid to.

"Dan Brussee" <db******@nc.rr.com> wrote in message
news:so********************************@4ax.com...
I know, of course that client side stuff cant call server code
directly. What I am doing is putting in a basic LeftHand menu bar
using a user control that contains a datagrid composed of linkbutton
controls. I am populating this either manually (one item at a time
programatically) or via a DataBind to a database table.

How do I link the items to server side code methods? If I had created
the link buttons manually on the page, they would be tied code with
even handlers on their click events dynamically. Im wondering how I
would go about defining this event handler knowing....

A. Visible text for menu item.
B. The name of the method in code that should be called as a result of
clicking on the menu item.

I want to be able to generate all the code to take care of the menu as
I build it, or when I call Databind.

TIA

Nov 18 '05 #2

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

Similar topics

2
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow...
7
by: moondaddy | last post by:
I have a user control being used instead of a frame page. when the user clicks on a menu item I need to send the ID (integer value) of that menu as a parameter in the postback of the user control...
1
by: Dan Brussee | last post by:
I know, of course that client side stuff cant call server code directly. What I am doing is putting in a basic LeftHand menu bar using a user control that contains a datagrid composed of linkbutton...
4
by: Barb | last post by:
I have a user control as my Save button for my page. When the Save button is clicked, I want some client-side validation to take place from a javascript function in the page, and then I'd like the...
3
by: Ant | last post by:
I'm building a Web user control that has several public functions. Can I fire them from the client side? for example Javascript and an HTML button
9
by: Charts | last post by:
I use VS2005 to build a asp.net 2.0 project. I want to be able to click a button on the page and have a dialog window appear where I can navigate the folders to get hold of a file path to load...
4
by: tshad | last post by:
Is there a way for a User Control to access an object (such as label or textbox) on the .aspx page that calls it? For example: x.aspx ************************************** .... Sub...
0
by: Steven Cheng [MSFT] | last post by:
Hi Nick, From the description in your first message, I think what you want to do the let the webservice server-side proactively notify the webservice client for some changing, correct? I'm...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.