C# : How to assgin events to a label while creating it? RRS feed

  • Question

  • first:thanks for your attention.

    i want my program to create labels when program's forum is been loaded with few event assign to it when clicked.

    most of these events are all the same expect one event which open a webpage in the browser. this event most be unique from other created labels of course and i think the way i should do it is to make some sort of a variable for the label, and then have the event to check the clicked label variable for it.

    do you know how to add an OnClick event for the created label in my Label Creator script and maybe how to create a custom variable for the label and also maybe how to check what label is clicked for my OnClick function?

    • Moved by Tina-Shi Sunday, February 15, 2015 8:36 AM the issue is not the VS general issue
    Saturday, February 7, 2015 10:13 AM


  • Hi soorena12,

    Thank you for posting in MSDN forum.

    Since this issue is discuss the Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. So I’m afraid that it is not the correct forum for this issue.

    To help you find the correct forum for this issue, could you please tell me which program you create using c# language? Is it a ASP.NET program or ther?

    If yes, I suggest you can ask this issue directly to the ASP.NET forum: , you will get better support.And I find a similar thread for this issue, please refer it.

    If no. please tell me more detail message about your program.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, February 9, 2015 6:25 AM