asp.net browse for folder
System.Windows.Forms;
FolderBrowserDialog ÌṩÁËÎÒÃÇÐèÒªµÄÎļþ¼Ðä¯ÀÀ¶Ô»°¿ò£¬ÒòΪÊÇCOM±ØÐëÊÇSTAµÄ£¬ÉèÖà AspCompat="true"À´½â¾öÕâ¸öÎÊÌâ¡£
Ó÷¨£º
protected void Button1_Click(object sender, EventArgs e)
{
if (folderBrowser.ShowDialog() == DialogResult.OK)
{
this.txtFolder.Text = folderBrowser.SelectedPath;
}
}
Ïà¹ØÎĵµ£º
package com.accp.filter;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.H ......
¿´¹ý΢ÈíµÄÍøÕ¾ÓÐʱºò£¬ÊÇ.MSPXµÄÀ©Õ¹Ãû£¿ÆäʵÄãÒ²¿ÉÒÔÅäÖ㬺ܼòµ¥¡£Here We Go!
ÅäÖÃWEB.CONFIG£º
<system.web>
<compilation>
<buildProviders>
<add ......
ÔÚÔçÆÚѧϰc#µÄ¹ý³ÌÖУ¬¾³£Óöµ½ÕâÑùµÄÓï¾ä£º
public string StudentName
{
get{return stuName;}
set{stuName=value;}
}
µ±Ê±Ò²²»ÊǺÜÃ÷°×ΪʲôҪÕâÑù£¿Ñ§ÉîÁËc#ºó£ ......
protected void Page_Load(object sender, EventArgs e)
...{
this.btnOK.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(btnOK, "Click") + ";this.disabled=true; this.value='Ìá½»ÖÐ...';");
}
//°´Å¥´¦Àí·½·¨
protected void btnOK_C ......
µÚÒ»ÖÖ·½·¨£º
ͨ¹ýURLÁ´½ÓµØÖ·´«µÝ
send.aspx:
protected void Button1_Click(object sender, EventArgs e)
{
Request.Redirect("Default2.aspx?username=honge");
}
receive.aspx:
string user ......