站内搜索:     
站点首页破釜学院编程开发.NETASP.NET → 让ASP.NET简便使用SCRIPT
正在加载相关信息.....
Web 站内搜索
让ASP.NET简便使用SCRIPT
】【打印】【加入收藏】【关闭收藏到新浪ViVi】【收藏到365KEY】 浏览字号:
日期:2006-07-17 人气: 出处:天极网

00132 mWidth = value ;

00133 }

00134 }

00135 private ReturnElementCollections mReturnElements = new ReturnElementCollections ();

00136 ///



00137 /// 获取返回值元素集

00138 ///


00139 public ReturnElementCollections ReturnElements

00140 {

00141 get

00142 {

00143 return mReturnElements ;

00144 }

00145 }

00146 private ParameterCollection mParameters = new ParameterCollection ();

00147 ///

00148 /// 获取打开页面的参数集

00149 ///


00150 public ParameterCollection Parameters

00151 {

00152 get

00153 {

00154 return mParameters ;

00155 }

00156 }

00157 private string GetPage ()

00158 {

00159 if ( Parameters . Count ==0)

00160 return "' "+OpenPage+" '" ;

00161 System . Text . StringBuilder sb = new System . Text . StringBuilder ();

00162 sb . Append ("' "+OpenPage+" '" );

00163 string param ="" ;

00164 string parent = GetParent ();

00165 for ( int i =0; i < Parameters . Count ; i ++)

00166 {

00167 if ( Parameters [ i ]. Element == ElementType . Element )

00168 {

00169 param ="' " + Parameters[i].Name +" =' + " + parent +"document.all('

"+Parameters[i].Value + " ').value" ;

00170 }

00171 else if ( Parameters [ i ]. Element == ElementType . Select )

00172 {

00173 param ="' " + Parameters[i].Name +" =' + " + parent +"__getSeletedButton(" + parent +

"document.all(' "+Parameters[i].Value + " '))" ;

00174 }

00175 if ( i ==0)

00176 {

00177 sb . Append ("+' "+System.Web.HttpUtility.UrlEncode(" ?") +" '+" + param );

00178 }

00179 else

00180 {

00181 sb . Append ("+' "+System.Web.HttpUtility.UrlEncode(" &") +" '+" + param );

00182 }

00183 }

00184 return sb . ToString ();

00185 }

00186

00187

00188

00189 }

00190 #region subClass

00191 public enum ElementType

00192 {

00193 None ,

00194 Element ,

00195 Select



--------------------------------------------------


00196 }

00197 ///

00198 /// 参数描述类

00199 ///


00200 public class Parameter

00201 {

00202 ///

00203 /// 构造参数对象

00204 ///


00205 public Parameter ()

00206 {

00207 }

00208 ///

00209 /// 构造指定名称和值的参数对象

00210 ///


00211 /// 参数名称

00212 /// 参数值

00213 public Parameter ( string name , string value )

00214 {

00215 Name = name ;

00216 Value = value ;

00217 }

00218 ///

00219 /// 构造指定名称和值的参数对象

00220 ///


00221 /// 参数名称

00222 /// 参数值

00223 /// 值是否元素名称

00224 public Parameter ( string name , string value , ElementType element )

00225 {

00226 Name = name ;

00227 Value = value ;

00228 Element = element ;

00229 }

00230

00231 private string mName ;

00232 ///

00233 /// 获取或设置参数名称

00234 ///


00235 public string Name

00236 {

00237 get

00238 {

00239 return mName ;

00240 }

00241 set

00242 {

00243 mName = value ;

00244 }

00245 }

00246 private string mValue ;

00247 ///

00248 /// 获取或设置参数值

00249 ///


00250 public string Value

00251 {

00252 get

00253 {

00254 return mValue ;

00255 }

00256 set

00257 {

00258 mValue = value ;

>>>> 进入论坛交流 <<<<

相关文章:
暂时没有相关文章