asp.net IP限制登陆
//思路:将其IP存入数据库的时候,以数字的形式存入.即可比较大小.
//比如:192.168.1.1 凡是后面位数不满3位的都以0填充.....那么存入形式为:192168001001
//因为:1只有一位...所以加00这样数据库中全部的都为12位的数字,即可比较.
public string getip(string ip)
{
String[] arr=ip.Split(new char[] {'.'});
string str = "";
for (int i = 0; i < arr.Length; i++)
{
if (str == "")
{
string str1="000" + arr[0].ToString();
str = str1.Substring(str1.Length - 3);
}
else
{
string str1 = "000" + arr[i].ToString();
str = str + str1.Substring(str1.Length - 3);
}
}
return str;
}
相关文档:
<asp:DropDownList ID="compactType" runat="server" AutoCallBack="True" Width="153px"> </asp:DropDownList>
<?xml version="1.0" encoding="utf-8" ?>
<roots>
<root>
<id>1</id>
<Culture> ......
前台代码:
<script type="text/javascript">
<%=LoadImage() %>
imgUrl1="uploads/"+ImgSrc[0];
imgtext1=ImgAlt[0]
imgLink1=escape("adimg.aspx?Img_ID="+ImgUrl[0]);
imgUrl2="uploads/"+ImgSrc[1];
imgtext2=ImgAlt[1]
imgLink2=escape("adimg.aspx?Img_ID="+ImgUrl[1]);
imgUrl3=" ......
Request.ServerVariables["Url"]
返回服务器地址
Request.ServerVariables["Path_Info"]
客户端提供的路径信息
Request.ServerVariables["Appl_Physical_Path"]
与应用程序元数据库路径相应的物理路径
Request.ServerVariables["Path_Translated"]
通过由虚拟至物理的映射后得到的路径
Request.ServerVariables ......
1.将flex编译后的程序插入到asp.net页面
flex的最终输出就是一张网页+一个flash(.swf文件)
这么说你明白了吧,其实就是用他生成的网页的方式把那个.swf文件插入到你的asp.net页面就可以了。
假如你的flex3项目名字叫TestApp,最简单直接的办法就是,
把"bin-debug"目录下的:
TestApp.html
TestApp.swf
AC_OETags.js ......
protected void btnsearch_ServerClick(object sender, EventArgs e)
{
string lujing=this.Text2.Value.ToString().Trim();
string shujuku = this.jine.Value;
&nbs ......