zoukankan
html css js c++ java
在后台获取前台按钮里的值(如LinkButton)
前台ASPX:
<
asp:LinkButton ID
=
"
LinkButton1
"
CommandArgument
=
'
<%# Eval("id") %>
'
onclick
=
"
LinkButton1_Click
"
runat
=
"
server
"
CssClass
=
"
dayifen
"
>
打一分
</
asp:LinkButton
>
后台CS:
protected
void
LinkButton1_Click(
object
sender, EventArgs e)
{
LinkButton btn
=
(LinkButton)sender;
int
newsId
=
int
.Parse(btn.CommandArgument);
if
(NewsManager.AddScore(newsId))
{
Response.Write(
"
<script>alert(\
"
打分成功!\
"
)</script>
"
);
NewsListBind();
}
else
{
Response.Write(
"
<script>alert(\
"
打分失败!\
"
)</script>
"
);
}
}
查看全文
相关阅读:
C#编程(三)
C#编程(二)
C#编程(一)
【C#高级编程】笔记之核心C#
unity3d所要知道的基础知识体系大纲,可以对照着学习
Unity的界面排版: RectTransform
Unity3d操作的一些技巧知识点和BUG解决方案
Unity中一键创建常用文件夹
【Unity技巧】自定义消息框(弹出框)
【Unity Tips】备忘录(扫盲篇)
原文地址:https://www.cnblogs.com/kingfly/p/1588683.html
最新文章
面试题之数三退一智力游戏
总是弹出visual studio 实时调试器 三种解决办法
EX:The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
其他信息: 未找到源,不过,未能搜索部分或所有事件日志。 若要创建源,您需要用于读取所有事件日志的权限以确保新的源名称是唯一的。 不可访问的日志: Security。
SQL Server Profiler
c# equals与==
SQLSERVER系统视图,系统表,sys.sql_modules视图
IE弹出窗口显示URL地址栏
Asp.net MVC 的八个扩展点
理解jquery的$.extend()、$.fn和$.fn.extend()
热门文章
python练习程序(批量重命名)
【转】Linux配置NTP时间同步服务器
【转】Linux---centos安装配置并挂载NFS
【three.js练习程序】创建简单物理地形
【three.js练习程序】创建简单物理场景
【three.js练习程序】创建太阳系
【three.js练习程序】创建地球贴图
【three.js练习程序】拖动选中的物体
【three.js练习程序】旋转、缩放场景
【three.js练习程序】旋转物体自身
Copyright © 2011-2022 走看看