网页与 C# 程序上的/触发事件通信?
我计划创建一个 C# 程序(具体来说是一个 IRC 机器人)。我需要它能够接收来自网页的请求和/或受网页控制。我计划购买一个 VPS,用来托管我的网站和这个机器人。
例如,假设我在 ajax 页面上有一个按钮。如果用户单击该按钮,它是否可以使用 php 触发 ac# 事件,并且可能携带一些参数(例如同一页面上表单中的文本)?
我是这个编程领域的新手,可能不会使用一些正确的术语,请随时纠正我。
I'm planning on creating a C# program (an IRC bot, to be specific). I need it to be able to receive requests from and/or be controlled by a web page. I plan on getting a VPS, that I will host my website and this bot on.
For example, suppose I have a button on an ajax page. If a user clicks that button, could it trigger a c# event using php, and perhaps carry some arguments (like text in a form on that same page)?
I am new to this field of programming and may not use some correct terminology, and feel free to correct me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来您想使用
TcpClient
。 System.Net.Sockets.TcpClientSounds like you want to be using
TcpClient
. System.Net.Sockets.TcpClient繁荣宝贝! IRC 机器人代码是 he'ya:
IRC Bot 代码
虽然周日有一百种方法制作一个响应http请求的程序,去做一个关于Asp.Net的教程。无论是通过网页执行命令还是显示界面,这都将是您迈向简单新技术的良好一步:
http://www.asp.net/mvc
特别是,请完成该网页上的免费 PluralSight 培训。你不会后悔的。
Boom baby! IRC bot code is he'ya:
IRC Bot code
And while there are a hundred ways to sunday to make a program that responds to http requests, go do a tutorial on Asp.Net. Whether it's taking a command through a web page or showing an interface, this will be a nice step into an easy new technology for you:
http://www.asp.net/mvc
In particular, go through the free PluralSight training on that web page. You will not regret it.