人生是一场不能存盘的RPG,我只能尽量多搞几个Screenshot

May 29, 2006

webcast_How do I Video Series_Tips and Tricks

Filed under: ASP.NET

How do I? Video Series : Tips and Tricks (hilo_tips_final.wmv)
http://asp.net/default.aspx?tabindex=4&tabid=3000
http://asp.net/learn/howdoi/default.aspx?tabid=63

通过代码加解密的connection string

public void EncryptConfig(bool bEncrypt)
{
    string path = "/tricks";
   
    Configuration config = WebConfigurationManager.OpWebConfiguration(path);
    ConfigurationSection appSettings = config.GetSection("connectionString");
   
    if(bEncrypt)
    {
        appSettings.SetionInformation.ProtectSection("DataProtectionConfigurationProvider");
    }
    else
    {
        appSettings.SetionInformation.UnprotectSection();  
    }
    config.Save();
}

保持滚动条的当前位置
    <%@ Page MaintainScrollPostionOnPostback = "true">
   
跨页面提交
    设置page1的PostBackUrl ="page2.aspx"
    设置page1的form1的
        DefaultButton和DefaultFocus
       
    在page2.aspx的page_load中写下:
    if(!Page.IsPostBack)
    {
        TextBox t = (TextBox)PreviousPage.FindControl("textbox1");
        this.lable1.Text = t.Text;
    }
   
使用BulletedList data binding到xml.
   
   
File Upload Control
   
    if(fileUpload1.HasFile)
    {
        fileUpload1.SaveAs("C:\upload\"+ fileUpload1.FileName);
    }

URL mapping 把一个很复杂的url map成一个简单的url.
    <System.web>
        <add url="…" mappedUrl="…">
    <System.web>
   
使用MultiView控件

Comments »

The URI to TrackBack this entry is: http://recordsome.blogsome.com/2006/05/29/webcast_how-do-i-video-series_tips-and-tricks/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.






















Get free blog up and running in minutes with Blogsome
Theme designed by Hadley Wickham