大悟县尊茂网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

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://www.omfev.com/article/pcghie.html">http://www.omfev.com/article/pcghie.html</a>
            </div>
        </div>
        <div class="othernews">
            <h3>其他资讯</h3>
            <div class="othernews_list">
                <ul>
                    <li>
                            <a href="/article/cdichc.html">Linux中怎么如何使用userdel命令删除用户-创新互联</a>
                        </li><li>
                            <a href="/article/cichhs.html">蘑菇租房爆雷创始人兼CEO予以回复</a>
                        </li><li>
                            <a href="/article/cigoop.html">中文域名属于网址吗?中文域名与网址有什么区别?</a>
                        </li><li>
                            <a href="/article/sdsocd.html">LinuxShell脚本教程:找出占用CPU和内存过高的进程</a>
                        </li><li>
                            <a href="/article/eghdos.html">ps如何增加字体样式,ps增加字体的方法</a>
                        </li><li>
                            <a href="/article/joieoc.html">win11桌面改成d盘怎么改回去</a>
                        </li><li>
                            <a href="/article/hehees.html">php取数据库制定的字符 PHP截取字符串</a>
                        </li><li>
                            <a href="/article/deicccs.html">路由器设置信号 路由器设置信号强度选哪个</a>
                        </li><li>
                            <a href="/article/dghihej.html">新手必看!常见的网站排名优化的问题整理</a>
                        </li><li>
                            <a href="/article/dhicdph.html">怎么在自己的电脑上搭建虚拟主机?(电脑如何做虚拟主机)</a>
                        </li>                </ul>
            </div>
        </div>
    </div>
</div>

<div class="footer">
    <div class="footer_content">
        <div class="footer_content_top clear">
            <div class="content_top_share fl">
                <div><img src="/Public/Home/img/logo.png"></div>
                <div class="top_share_content">
                    <dd>分享至:</dd>
                    <dt class="bdsharebuttonbox clear" id="share">
                        <a href="#" class="bds_tsina iconfont fl" data-cmd="tsina" title="分享到新浪微博"></a>
                        <a href="#" class="bds_sqq iconfont fl" data-cmd="sqq" title="分享到QQ好友"></a>
                        <a href="#" class="bds_weixin iconfont fl" data-cmd="weixin" title="分享到微信"></a>
                        <a href="#" class="bds_weixin iconfont fl" data-cmd="tieba" title="分享到贴吧"></a>
                    </dt>
                    <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
                </div>
            </div>
            <div class="content_top_left fl clear">
                <div class="top_left_list fl">
                    <dd><a href="/about/">关于我们</a></dd>
                    <dt>
                        <a href="/about/#gsjj">公司简介</a>
                        <a href="/about/#fzlc">发展历程</a>
                    </dt>
                </div>
                <div class="top_left_list fl">
                    <dd><a href="/service/">服务项目</a></dd>
                    <dt>
                        <a href="/service/">高端网站建设</a>
                        <a href="/miniprogram/">小程序开发</a>
                        <a href="/service/app.html">APP开发</a>
                        <a href="/service/yingxiao.html">网络营销</a>
                    </dt>
                </div>
                <div class="top_left_list fl">
                    <dd><a href="/jianzhan/">建站知识</a></dd>
                    <dt>
                        <a href="/jianzhan/">行业新闻</a>
                        <a href="/jianzhan/">建站学堂</a>
                        <a href="/jianzhan/">常见问题</a>
                    </dt>
                </div>
                <div class="top_left_list fl">
                    <dd><a href="/contact/">联系我们</a></dd>
                    <dt>
                        <a href="/contact/#lxwm">公司地址</a>
                        <a href="/contact/#rczp">人才招聘</a>
                    </dt>
                </div>
            </div>
            <div class="content_top_right addressR fr">
                <div class="top_right_title addressf_title">
                    <a href="javascript:;" class="on">孝感</a>
                    <a href="javascript:;">重庆</a>
                </div>
                <div class="top_right_content addressf">
                    <div class="right_content_li on">
                        <div class="right_content_list clear">
                            <dd class="fl iconfont"></dd>
                            <dt class="fl">电话:028-86922220</dt>
                        </div>
                        <div class="right_content_list clear">
                            <dd class="fl iconfont"></dd>
                            <dt class="fl">地址:孝感市大悟县城关镇鄂北物流城13栋125号</dt>
                        </div>
                    </div>
                    <div class="right_content_li">
                        <div class="right_content_list clear">
                            <dd class="fl iconfont"></dd>
                            <dt class="fl">电话:028-86922220</dt>
                        </div>
                        <div class="right_content_list clear">
                            <dd class="fl iconfont"></dd>
                            <dt class="fl">地址:重庆市南岸区弹子石腾龙大道58号2栋21-6</dt>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="link">
            友情链接:
            <a href="http://www.cdcyfdjwb.com/" title="成都发电机维保" target="_blank">成都发电机维保</a>   <a href="http://www.cdbrznjsb.com/" title="配电室环境" target="_blank">配电室环境</a>   <a href="http://www.kmhhzp.com/" title="柴油发电机维修" target="_blank">柴油发电机维修</a>   <a href="http://www.kmhou.com/" title="昆明厨具" target="_blank">昆明厨具</a>   <a href="http://www.kmflx.com/" title="柴油发电机保养" target="_blank">柴油发电机保养</a>   <a href="http://www.ghfdjwb.com/" title="广汉箱式发电机维修" target="_blank">广汉箱式发电机维修</a>   <a href="http://www.jylskj.cn/" title="简阳网站运维" target="_blank">简阳网站运维</a>   <a href="http://www.kmrit.com/" title="橡塑保温材料" target="_blank">橡塑保温材料</a>   <a href="https://www.cdcxhl.com/quanwang.html" title="成都全网营销" target="_blank">成都全网营销</a>   <a href="http://www.xindouhcc.com/" title="新都餐饮管理" target="_blank">新都餐饮管理</a>           </div>
    </div>
    <div class="footer_content_copyright clear">版权所有:大悟县尊茂商贸有限公司
        <a href="http://beian.miit.gov.cn/" rel="nofollow" target="_blank">鄂ICP备2025141984号-8</a>
    </div>
</div>

<!--浮窗-->
<div class="FloatingWindow clear">
    <a href="tencent://message/?uin=1683211881&Site=&Menu=yes" class="FloatingWindow_list fr">
        <div class="FloatingWindow_list_title">
            <dd class="iconfont"></dd>
            <dt><span>在线</span>咨询</dt>
        </div>
    </a>
    <a href="javascript:;" class="FloatingWindow_list fr">
        <div class="FloatingWindow_list_title">
            <dd class="iconfont"></dd>
            <dt>服务热线</dt>
        </div>
        <div class="FloatingWindow_list_down fadeInRight animated">服务热线:028-86922220</div>
    </a>
    <a href="javascript:;" class="FloatingWindow_list fr STop">
        <div class="FloatingWindow_list_title">
            <dd class="iconfont"></dd>
            <dt>TOP</dt>
        </div>
    </a>
</div>

<script src="/Public/Home/js/jquery-1.8.3.min.js"></script>
<script src="/Public/Home/js/comm.js"></script>
<script src="/Public/Home/js/wow.js"></script>
<script src="/Public/Home/js/common.js"></script>
</body>
</html>
<script>
    $(".cont 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>