In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces ASP.NET how to achieve the article release management system, the article is very detailed, has a certain reference value, interested friends must read it!
Master page: SiteFont.Master
The code is as follows:
/ / $(function () {
/ / $("# nav li") .Mouseenter (function () {
/ / $(this) .addClass ("active") .siblings () .removeClass ("active")
/ /})
/ /})
My home page |
About us |
Resource download |
My collection |
Article dynamic |
About us.
Intellectual collaboration copyright 2013-2013 Yue A
Master page CSS file: main.css
The copy code is as follows:
Body {
}
.clear
{
Clear:both;}
# mainBox
{
Width:950px
Margin-left:auto
Margin-right:auto;}
# nav
{
List-style-type:none
Background-color:inherit
}
# nav LI
{
Float:left
Margin-right:20px
Font-size:large
}
# nav .active
{
Background-color:Red
}
Main page: News_admin.aspx
The copy code is as follows:
Publish an article
There are no articles for the time being
Modify
STitle
SbuildDate
IType
SUser
Article list page: News_list.aspx
The copy code is as follows:
There are no articles for the time being
Add / modify articles page: News_add.aspx
The copy code is as follows:
Attachment upload background code: Pic_load.aspx.cs
The copy code is as follows:
Using System
Using System.Collections.Generic
Using System.Linq
Using System.Web
Using System.Web.UI
Using System.Web.UI.WebControls
Using System.IO
Namespace Collaborative Enterprise Management system. Admin
{
Public partial class Pic_load: System.Web.UI.Page
{
Protected void Page_Load (object sender, EventArgs e)
{
}
Protected void Button1_Click (object sender, EventArgs e)
{
FileUpload fileload = (FileUpload) form1.FindControl ("FileUpload1")
If (fileload.HasFile) {
/ / verify the file type
String ext = Path.GetExtension (fileload.FileName). ToLower ()
Response.Write (ext)
If (ext = = ".jpg" | | ext = = ".jpeg" | | ext = = ".gif" | | ext = = ".png")
{
Response.Write ("sucess")
/ / full path. Root directory
Fileload.SaveAs (Server.MapPath ("~ / image/" + fileload.FileName))
}
Else
{
ClientScript.RegisterStartupScript (GetType (), "alert", "alert ('only jpg/jpeg/gif/png files are allowed to upload');", true)
Return
}
}
}
}
}
The above is all the contents of the article "how to implement the mini system of article release and management in ASP.NET". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.