朋友们可以自行测试,我这里都没有问题了,鳖了一上午的问题总算解决了
using system;
using system.collections;
using system.componentmodel;
using system.data;
using system.drawing;
using system.web;
using system.web.sessionstate;
using system.web.ui;
using system.web.ui.webcontrols;
using system.web.ui.htmlcontrols;
using system.xml ;
namespace webapplication1
{
/// <summary>
/// summary description for webform1.
/// </summary>
public class webform1 : system.web.ui.page
{
protected system.web.ui.webcontrols.textbox textbox1;
protected system.web.ui.webcontrols.dropdownlist dropdownlist1;
protected system.web.ui.webcontrols.button button1;
public webform1()
{
page.init += new system.eventhandler(page_init);
}
private void page_load(object sender, system.eventargs e)
{
if(!page.ispostback)
{
//打开某文件(假设web。config在根目录中)
string filename=server.mappath("/") + @"\web.config";
xmldocument xmldoc= new xmldocument();
| 对此文章发表了评论 |

