Click here to Skip to main content
15,896,201 members
Home / Discussions / C#
   

C#

 
GeneralRe: Passing values to methods. Pin
zaboboa23-Aug-05 6:39
zaboboa23-Aug-05 6:39 
GeneralRe: Passing values to methods. Pin
Guffa23-Aug-05 7:02
Guffa23-Aug-05 7:02 
GeneralRe: Passing values to methods. Pin
Matt Gerrans23-Aug-05 9:43
Matt Gerrans23-Aug-05 9:43 
GeneralNewsletter/Massemail Pin
cyonite23-Aug-05 6:04
cyonite23-Aug-05 6:04 
GeneralSystem.Diagonastics.Process.GetProcesses throws error if the user does not have admin rights. Pin
manivannan.p23-Aug-05 5:14
manivannan.p23-Aug-05 5:14 
GeneralRe: System.Diagonastics.Process.GetProcesses throws error if the user does not have admin rights. Pin
Judah Gabriel Himango23-Aug-05 5:19
sponsorJudah Gabriel Himango23-Aug-05 5:19 
GeneralRe: System.Diagonastics.Process.GetProcesses throws error if the user does not have admin rights. Pin
manivannan.p23-Aug-05 18:45
manivannan.p23-Aug-05 18:45 
GeneralDynamic Event Handler Pin
pssuresh23-Aug-05 4:52
pssuresh23-Aug-05 4:52 
Menu Item names are directly coming from the database and i want to attach menu item with the event handler names.
so i name event handler as "handle" + item.name(value from database) + "click".I want to attach it dynamically.

the code is as follows

//sample code
public class myclass
{


protected void Handle_FileMenuItem_Click(System.Object sender, System.EventArgs e)
{


}


public bindeventhandler()
{
string dynamiceventhandler="";
dynamiceventhandler="Handle_" + item.Name + "_Click";
Delegate temp=Delegate.CreateDelegate(typeof(EventHandler),this,dynamiceventhandler);
item.Click+=(EventHandler)temp;

}

}

The code is throwing error. Error binding to target method.

Can anyone pl explain how to solve this error...

i got the idea from this url

http://www.dotnet247.com/247reference/msgs/21/106638.aspx



GeneralRe: Dynamic Event Handler Pin
SeMartens23-Aug-05 5:12
SeMartens23-Aug-05 5:12 
GeneralIIS virtual Directory Pin
C0d3_P03t23-Aug-05 4:26
C0d3_P03t23-Aug-05 4:26 
GeneralRe: IIS virtual Directory Pin
BammBamm23-Aug-05 5:34
BammBamm23-Aug-05 5:34 
GeneralRe: IIS virtual Directory Pin
Sarvesvara (BVKS) Dasa23-Aug-05 16:50
Sarvesvara (BVKS) Dasa23-Aug-05 16:50 
GeneralRe: IIS virtual Directory Pin
C0d3_P03t23-Aug-05 23:41
C0d3_P03t23-Aug-05 23:41 
GeneralSerializationException With DataTable Pin
Wender Oliveira23-Aug-05 4:06
Wender Oliveira23-Aug-05 4:06 
GeneralRe: SerializationException With DataTable Pin
SeMartens23-Aug-05 4:21
SeMartens23-Aug-05 4:21 
GeneralRe: SerializationException With DataTable Pin
Wender Oliveira23-Aug-05 4:48
Wender Oliveira23-Aug-05 4:48 
GeneralRe: SerializationException With DataTable Pin
miah alom23-Aug-05 4:39
miah alom23-Aug-05 4:39 
GeneralRe: SerializationException With DataTable Pin
Wender Oliveira23-Aug-05 7:23
Wender Oliveira23-Aug-05 7:23 
GeneralDirectX getting bogged down with nothin to do? - C# Pin
YawgmothIII23-Aug-05 3:41
YawgmothIII23-Aug-05 3:41 
GeneralRe: DirectX getting bogged down with nothin to do? - C# Pin
Judah Gabriel Himango23-Aug-05 5:15
sponsorJudah Gabriel Himango23-Aug-05 5:15 
GeneralNo templates in C# Pin
Tomerland23-Aug-05 2:49
Tomerland23-Aug-05 2:49 
GeneralRe: No templates in C# Pin
mav.northwind23-Aug-05 3:11
mav.northwind23-Aug-05 3:11 
GeneralSSL sockets Pin
g00fyman23-Aug-05 2:45
g00fyman23-Aug-05 2:45 
GeneralRe: SSL sockets Pin
Werdna23-Aug-05 6:32
Werdna23-Aug-05 6:32 
GeneralRe: SSL sockets Pin
g00fyman23-Aug-05 13:25
g00fyman23-Aug-05 13:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.