高分寻delphi自动发帖机代码。
解决方案 »
- 数据只读的问题.在线等呀.
- PageControl组件,如何动态增加/删除其上的TabSheet页面,并在页面上放置其它控件?
- 大家看一下这个关于在delphi中自动 建库的代码问题??
- 调查:不知道各位大虾用DELPHI做什么样的工作?待遇如何?
- 如何能不引用A单元,引用A单元的函数,程序,变量?
- 急,listView问题,为何我对他刷新,为何上边的columns老是闪烁啊~~~~
- DLL问题(高手请进)
- DBGrid 中有没有哪个属性可以知道DBGrid中有多少 列 的字段?
- 能不能在DBGgrid的最未记录下添一行用于统计的行格吗?
- 一个很简单的问题,我在建一个主从数据库(明细型数据库应用程序)不能联接啊,初学者
- 我什么时候才能用上无风扇的电脑?
- 源程序使用的控件没有了有什么好办法处理?
http://community.csdn.net/openapi/openapiexplain.htm
//我用C#写的
//下面是自动发贴的代码
private void PostTest(string username,string password,string body,string subject,string forumids,int point)
{
string topicurl;
CSDNTest.ForumAPI FA = new CSDNTest.ForumAPI(); Identity id = new Identity();
id.username = username;
id.password = password; Post post1 = new Post();
post1.body = body;
post1.subject = subject;
post1.editor = EditorType.UBB;
System.Guid forumid = new Guid(forumids);
post1.forumId = forumid;
post1.point = point;
post1.isAskExpert = false;
post1.tag = "";
Error errorinfo = new Error();
FA.Post(id, post1, out errorinfo, out topicurl);
}
protected void Button1_Click(object sender, EventArgs e)
{
if (txtusername.Text.Trim() == "")
{ Response.Write("添写用户名");
Response.End();
}
if (txtpassword.Text.Trim()=="")
{
Response.Write("添写密码");
Response.End();
}
if (txtsubject.Text.Trim() == "")
{
Response.Write("添写发贴主题");
Response.End();
} if (txtcontent.Text.Trim() == "")
{
Response.Write("添写发贴内容");
Response.End();
} if (txtpoint.Text.ToString().Trim() == "")
{
Response.Write("添写发贴分数");
Response.End();
} PostTest(txtusername.Text.Trim(), txtpassword.Text.Trim(), txtsubject.Text.Trim(), txtcontent.Text.Trim(), DropDownList1.SelectedValue, Convert.ToInt32(txtpoint.Text.ToString()));
}
http://topic.csdn.net/u/20081120/11/f7a9770f-4b10-404d-a388-5613f7ebd37e.html