处理有返回值的和return的asp.net写法
SqlConnection conPortal = new SqlConnection(CommunityGlobals.ConnectionString);
SqlCommand cmdAdd = new SqlCommand( "Community_DiscussAddPost", conPortal);
cmdAdd.CommandType = CommandType.StoredProcedure;
cmdAdd.Parameters.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue; //处理return的返回值
cmdAdd.parameters.Add("@outputvalue",sqlDbType.Int);
cmdAdd.Parameters[].Direction=parameterDirectionOutput;
/**上面两句等同于cmdAdd.Parameters.Add("@outputvalue",sqlDbType.Int).Direction=ParameterDirectionOutput;
**/
cmdAdd.Parameters.Add("@communityID", CommunityGlobals.CommunityID);
cmdAdd.Parameters.Add("@sectionID", sectionID);
相关文档:
1. javaScript函数中执行C#代码中的函数:
方法一:1、首先建立一个按钮,在后台将调用或处理的内容写入button_click中;
2、在前台写一个js函数,内容为document.getElementById("btn1").click();
3、在前台或后台调用js函数,激发click事件,等于访问后台c ......
public class DBHelper
{
private static SqlConnection connection;
public static SqlConnection Connection
{
&nb ......
Introduction
Before explaining cache management in ASP.NET, let me clarify that different people use different terms for explaining the same concept i.e. managing data. Some people refer to it as state management and some others refer to it as cache management. I love to use the term cache manageme ......
第一种
<%=RetInfo("DB","数据库") %>
<%=RetInfo("YX_UpFile","上传文件") %>
<%=RetfileInfo("Include/", "广告")%>
//从前台调用后台方法
//从前台调用后台的方法..并向其方法传入不同的参数!
第二种
<ItemTemplate >
<%#Ret_stat(Convert.ToInt16(Eval("YX_Stat1")), "热点")%>
......
1) 多选效果
多选效果完全可以通过脚本进行实现。我们知道,多选的控件最终生成一个input的HTML标签,它的类型是checkbox。由于这个页面中只有一组复选框,所以实现起来也比较方便:我们可以遍历所有的input标签,对比其type属性是不是checkbox,如果是checkbox,就给它设置相应的选中状态就行了。
代码如下:
<scri ......