网站建设资讯

NEWS

网站建设资讯

VB.NET如何生成静态页面和分页原理

这篇文章主要为大家展示了“VB.NET如何生成静态页面和分页原理”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“VB.NET如何生成静态页面和分页原理”这篇文章吧。

成都创新互联公司网站设计,为客户量身定制各类网站建设业务,包括企业型、电子商务型、响应式网站、行业门户型等各类网站,实战经验丰富,成功案例众多。以客户利益为出发点,成都创新互联公司网站制作为客户规划、定制网站开发符合企业需求、带有营销价值的网络建站方案认真对待每一个客户,我们不用口头的语言来吹擂我们的优秀,数千家的成功案例见证着我们的成长。

1、VB.NET生成静态页面和分页原理静态页面template.html,主要是定义了一些特殊字符,用来被替换。

>    $Titletitle> head> <body> <div style="width: 417px; height: 54px" align="center"> <br /> $Titlediv> <div style="width: 417px; height: 8px"> 浏览<font color="red"><script src="http://localhost/.Net/NewsFiles/ClickCount.aspx?NewsId=$NewsId">script>font>次  $Timediv> <div style="width: 417px; height: 100px"> $Contentdiv> <div style="width: 416px; height: 9px"> $Pagerdiv> <div style="width: 416px; height: 8px"> <form id="form1" action="../AddComment.aspx" style="margin:0px"> <input id="Text1" type="text" /><Img id="Image1" src="../../UserInfo/CheckCode.aspx"/><br /> <textarea  id="CommentContent" cols="20" rows="2">textarea> <br /> <input id="NewsId" type="hidden" value="$NewsId"/> <input id="Button1" type="submit" value="button" /> <a href="../Display.aspx?NewsId=$NewsId">查看更多评论a>form> div> body> html></pre><p><strong>2、VB.NET生成静态页面和分页原理分析前态页面 NewsAdd.aspx,就是一个表单,用来填写新闻的标题和内容。</strong></p><pre><%...@ Page Language="C#" AutoEventWireup="false" validateRequest="false" CodeFile="NewsAdd.aspx.cs" Inherits="NewsAdd.Admin_AdminPanel_NewsAdd" %> <%...@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %> > <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>添加新闻title> head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label2" runat="server" Text="标题">asp:Label> <asp:TextBox ID="Title" runat="server" Width="325px">asp:TextBox><br /> <asp:Label ID="Label1" runat="server" Text="内容">asp:Label> <FCKeditorV2:FCKeditor id="Content" basePath="~/FCKeditor/"  runat="server" Height="400px" Width="70%">FCKeditorV2:FCKeditor> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <asp:Label ID="Message" runat="server" >asp:Label>div> form> body> html></pre><p><strong>3、VB.NET生成静态页面和分页原理后台页面 NewsAdd.aspx.cs</strong></p><pre>using System;  using System.Data;  using System.Configuration;  using System.Collections;  using System.Web;  using System.Web.Security;  using System.Web.UI;  using System.Web.UI.WebControls;  using System.Web.UI.WebControls.WebParts;  using System.Web.UI.HtmlControls;  using MySQLserver;  using System.IO;  using System.Text;  namespace NewsAdd  ...{  public partial class Admin_AdminPanel_NewsAdd : System.Web.UI.Page  ...{  protected void Page_Load(object sender, EventArgs e)  ...{  }  protected void Button1_Click(object sender, EventArgs e)  ...{  string strDate = DateTime.Now.ToString("yyMMdd") + "\" + DateTime.Now.ToString("yyyymmddhhmmss");  string strFileName = strDate + ".shtml";//存储到数据库中  string strTitle=Request.Form["Title"].ToString().Trim();//接收传过来的标题  string strContent=Request.Form["Content"].ToString().Trim();//接收传过来的内容  string[] content = strContent.Split(new Char[] ...{'|'});//对内容进行拆分,并保存到数组  int upbound = content.Length;//数组的上限  SqlServerDataBase db = new SqlServerDataBase();  bool success = db.Insert("insert into inNews(Title,Content,FilePath)values('" + strTitle + "','" + strContent + "','" + strFileName + "')", null);  //if (success)     // Message.Text = "添加成功!";  /**////////////////////////////创建当前日期的文件夹开始  string dir = Server.MapPath("../../"+"NewsFiles/"+DateTime.Now.ToString("yyMMdd"));//用来生成文件夹  if (!Directory.Exists(dir))  ...{  Directory.CreateDirectory(dir);  }</pre><p>以上是“VB.NET如何生成静态页面和分页原理”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注创新互联行业资讯频道!</p>            
            
                        <br>
            新闻名称:VB.NET如何生成静态页面和分页原理            <br>
            网页网址:<a href="http://cdweb.net/article/pcghie.html">http://cdweb.net/article/pcghie.html</a>
        </div>
    </div>
    <div class="other">
        <h3>其他资讯</h3>
        <ul>
            <li>
                    <a href="/article/hdshsc.html">sqlserver花钱吗,sqlserver免费吗</a>
                </li><li>
                    <a href="/article/hdsppc.html">如何换oracle,如何换备胎</a>
                </li><li>
                    <a href="/article/hdshss.html">怎么在php建数据库,怎么在php建数据库文件</a>
                </li><li>
                    <a href="/article/hdshds.html">go语言隐藏窗口,go语言信息隐藏实验</a>
                </li><li>
                    <a href="/article/hdsppe.html">记事本程序vb.net的简单介绍</a>
                </li>        </ul>
    </div>
</div>
</div>
<footer>
    <div class="footop">
        <div class="wrap">
            <div class="bottomrpw">
                <div class="erp arp">
                    <dl>
                        <dt>ADDRESS</dt>
                        <dd class="address"> <i class="icon"></i> <span class="word">成都市青羊区锦天国际1号楼1002室</span> </dd>
                    </dl>
                </div>
                <div class="erp arp">
                    <dl>
                        <dt>TEL</dt>
                        <dd class="phonum"> <i class="icon"></i> <span class="word en"> <a href="tel:18980820575">18980820575</a> </span> </dd>
                    </dl>
                </div>
                <div class="erp crp">
                    <dl>
                        <dt>OTHER</dt>
                        <dd> <a class="word get-quote">获得报价与方案</a> </dd>
                        <dd> <a href="#" target="_blank" rel='nofollow' class="word" title="付款方式">付款方式</a> </dd>
                    </dl>
                </div>
                <div class="erp code-rp">
                    <dl>
                        <dt>Wechat</dt>
                        <dd class="code-wrap"> <span class="code"> <img src="/Public/Home/images/qr-code.jpg" alt="快上网微信公众号" /> </span> </dd>
                    </dl>
                </div>
            </div>
        </div>
    </div>
    <div class="footerbot">
        <div class="friendlinks">
            <div class="wrap">
                <ul class="rpl">
                    <li><a href="http://www.sichuanairmedia.com/" title="四川航空文化" target="_blank">四川航空文化</a></li><li><a href="https://www.cdcxhl.com/idc/cqstsx.html" title="重庆水土双线托管" target="_blank">重庆水土双线托管</a></li><li><a href="http://www.ncjbc.cn/" title="南充护栏钻孔机" target="_blank">南充护栏钻孔机</a></li><li><a href="http://www.kswcd.com/" title="网站定制" target="_blank">网站定制</a></li><li><a href="http://www.cdkjz.cn/wangzhan/" title="seo优化排名" target="_blank">seo优化排名</a></li><li><a href="http://www.cdkjz.cn/fangan/waimao/" title="外贸网站设计方案" target="_blank">外贸网站设计方案</a></li><li><a href="http://www.whjierui.cn/" title="乐山企业网站设计" target="_blank">乐山企业网站设计</a></li><li><a href="https://www.cdcxhl.com/mobile.html" title="成都做手机网站" target="_blank">成都做手机网站</a></li><li><a href="http://www.cdxwcx.cn/tuoguan/xiyun.html" title="成都移动托管" target="_blank">成都移动托管</a></li><li><a href="http://www.scqtclxh.com/" title="成都火锅桌椅" target="_blank">成都火锅桌椅</a></li>                </ul>
            </div>
        </div>
        <div class="wrap">
            <div class="copyright"> <span class="en">©2007-2022</span> 成都快上网科技有限公司 <span class="en">ALL RIGHTS
                        RESERVED.</span> <a rel="nofollow" href="http://www.miitbeian.gov.cn" target="_blank">蜀ICP备19037934号</a> </div>
        </div>
    </div>
</footer>
<div class="fcwrap">
    <ul class="rpl clearfix">
        <li class="phone"> <a rel="nofollow" target="_blank" href="tel:18980820575"> <i class="icon"></i>
            <strong>18980820575</strong> </a> </li>
        <li class="qq"> <a rel="nofollow" target="_blank"
                           href="https://wpa.qq.com/msgrd?v=1&uin=244261566&site=qq&menu=yes"> <i class="icon"></i>
            <strong>244261566</strong> </a> </li>
        <li class="back-top"> <a href="javascript:void(0)" rel="nofollow" class="back-to-top"> <i class="icon"></i>
            <strong>回到顶部</strong> </a> </li>
    </ul>
</div>
<!--nav-->
<div class="n-Wrap">
    <div class="navBar visble show">
        <div class="barlogo">
            <a href="/" rel="nofollow">
                <img src="/Public/Home/images/logo1.png" alt="成都做网站" />
                <img src="/Public/Home/images/logo2.png" alt="成都网站设计" />
            </a>
        </div>
        <div class="bmenu">
            <i class="bar-top"><span></span></i>
            <i class="bar-cen"><span></span></i>
            <i class="bar-bom"><span></span></i>
            <i class="bar-left"><span></span></i>
            <i class="bar-right"><span></span></i>
        </div>
    </div>
    <section class="fixmenu">
        <div class="close-bar">
            <i class="bar-left"><span></span></i>
            <i class="bar-right"><span></span></i>
        </div>
        <nav class="smph">
            <ul>
                <li class="index-hrefs on"><a href="http://www.cdweb.net/"><font>首页</font></a></li>
                <li><a href="/about/" rel="nofollow"><font>关于快上网</font></a></li>
                <li><a href="/service/" rel="nofollow"><font>服务范围</font></a></li>
                <li><a href="/case/" rel="nofollow"><font>案例展示</font></a></li>
                <li><a href="/solve/" rel="nofollow"><font>解决方案</font></a></li>
                <li><a href="/news/" rel="nofollow"><font>建站资讯</font></a></li>
                <li><a href="/contact/" rel="nofollow"><font>联系快上网</font></a></li>
            </ul>
            <div class="pwrap">
                <span class="label">服务热线</span>
                <strong class="phone"><a href="tel:18980820575">18980820575</a></strong>
            </div>
        </nav>
    </section>
</div>
<!--end nav-->
<script src="/Public/Home/js/hotcss.js"></script>
<script type="text/javascript" src="/Public/Home/js/su_new.js"></script>
</body>
</html>
<script>
    $(".con img").each(function(){
        var src = $(this).attr("src");    //获取图片地址
        var str=new RegExp("http");
        var result=str.test(src);
        if(result==false){
            var url = "https://www.cdcxhl.com"+src;    //绝对路径
            $(this).attr("src",url);
        }
    });
    window.onload=function(){
        document.oncontextmenu=function(){
            return false;
        }
    }
</script>