Last post Apr 11, 2015 10:48 AM by diana12345
Apr 11, 2015 02:13 AM|diana12345|LINK
I have a project using ASP.NET and then i have a algorithm in C#.
I would like to click asp button to connect it.
Can you help me? Thanks a lot. Gbu.
Apr 11, 2015 03:08 AM|adeelehsan|LINK
What I understood is that you have some code written in C# that you want to call in ASP.NET project. If I am correct, then you can create a class that contains your C# code as a method and add this class with in your ASP.NET project.
Then on the click of the button, simply create the object of the class and call the respective method. If your requirements are different then please explain a bit more and if possible post your C# code here.
Apr 11, 2015 06:13 AM|diana12345|LINK
Thank you very much master,
Can u help me to show your code? Because i dont know.
I'm using Visual Studio 2010.
Apr 11, 2015 07:16 AM|smirnov|LINK
How to: Create Event Handlers in ASP.NET Web Forms Pages which explains how to add a handler declaratively for a server control
<asp:Button ID="Button1" runat="server" Text="Button" Onclick="Button1_Click" />
protected void Button1_Click(object sender, EventArgs e)
//Method for that event.
or the same could be done as
override protected void OnInit(EventArgs e)
Button1.Click += new System.EventHandler(Button1_Click);
Apr 11, 2015 10:48 AM|diana12345|LINK
Thank you master :)