惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
量子位
T
Tailwind CSS Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LangChain Blog
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
T
Troy Hunt's Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
T
Tor Project blog
T
The Blog of Author Tim Ferriss
I
Intezer
P
Privacy & Cybersecurity Law Blog
美团技术团队
N
Netflix TechBlog - Medium
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI

博客园 - 露雨城市.NET2.0和Sql Server 2005开发研究

关于asp.net将动态页直接生成静态页的随笔(乱码) 我的神龙卡KTV点播软件只有一个遗憾了 关于清除Sql Server Express版本的数据库日志文件 关于微软2008技术预览大会南京站和Vista 也许是转折-放弃了5,6K的月薪 关于vs2005中ajax控件暴露模板中控件,请高手进来聊聊. - 露雨城市.NET2.0和Sql Server 2005开发研究 这个基础题,你能做对吗? 好久没有来发文章了,今天来秀一下。 在.NET2.0中如何更简单的使用委托将方法加载到事件中去 Visual C#中父窗口和子窗口之间实现控件互操作 关于如何在子窗口中选择后,在父窗口赋值并让输入框设为只读。 - 露雨城市.NET2.0和Sql Server 2005开发研究 我的新资源网站开张了,韩国模版,韩国设计资源等。 关于在插入的模版中如何为已绑定了Text属性的TextBox设置默认值 今天好高兴,通过了微软的Sql Server 2005的70-31的考试。 赠送一张微软免费考试券 关于GridView中选择当前行的问题。 VS2005中的一个小BUG:关于Dropdownlist无法Datadinding的解决方法。 如何动态设置全局theme,及在web.config中读取pages节点的内容。 讲故事谈.NET委托:一个C#睡前故事
关于的MasterPage和Theme的问题。
露雨城市.NET2.0和Sql Server 2005开发研究 · 2005-12-16 · via 博客园 - 露雨城市.NET2.0和Sql Server 2005开发研究

1.好像修改站点级的主题不太方便,web.config里的程序不好改。
Page.Theme的属性,每个页面都要写。
有没有更好的办法能设置站点级的主题呢?
继承Page麻烦,重写Page的Page_PreInit方法倒是可以,不过默认的直接是继承的System.Web.Page类啊。

2.设置了一个MasterPage模版页,里面除了一些框架,导航之外,还有一个ContentPlaceHolder1控件。
代码如下:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
    
<div>
        
&nbsp;<table width="777" class="MainTable">
            
<tr>
                
<td colspan="3" align="center">
                    这是导航
</td>
            
</tr>
            
<tr>
                
<td style="width: 166px">
                                   
</td>
                
<td style="width: 418px">
        
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
        
</asp:contentplaceholder>
                
</td>
                
<td style="width: 182px">
                                   
</td>
            
</tr>
            
<tr>
                
<td colspan="3" style="height: 21px" align="center">
                    这是底部
</td>
            
</tr>
        
</table>
    
</div>
    
</form>
</body>
</html>

此时已经有form的服务器控件了,然后我再增加一个Default.aspx,应用这个模版时,default.aspx中有一些TextBox和Button控件。
我应该如何使用asp.net 2.0中新增的Form.DefaultButton和Form.DefaultFocus属性呢,没法增加Form了呀,而且原来的MasterPage.master中的form1也不能用。因为我很可能还有其他页面要使用这个模版,所以觉得这个应该是在Default.aspx中设置的,可是不知道如何设置。

不知道大家有没有想过这方面的问题?