处理有返回值的和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);
相关文档:
// <summary>
/// 过滤html代码
/// </summary>
public static string RphtmlStr(string html)
{
&n ......
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 ......
上一篇文章详细介绍了如何利用ASP.NET MVC创建自己的页面,在文章介绍了如何利用ViewData由Controller向View文件传值,那新的问题再次出现,我们除了能显示aspx文件外还能显示其它的文件么?
本文将详细介绍如何向View传值。
一、ViewData与TempData属性来向View页传递对象
上文中已经提到,使用ViewData可以将数据由Cont ......
第一种
<%=RetInfo("DB","数据库") %>
<%=RetInfo("YX_UpFile","上传文件") %>
<%=RetfileInfo("Include/", "广告")%>
//从前台调用后台方法
//从前台调用后台的方法..并向其方法传入不同的参数!
第二种
<ItemTemplate >
<%#Ret_stat(Convert.ToInt16(Eval("YX_Stat1")), "热点")%>
......