supermarket程序终于写好了,打包后却发现水晶报表不能用,原来还需要把水晶报表的程序安装在本地。下面是打包步骤,希望对用VS2008的同仁提供一点帮助。
迅雷下载:水晶报表10.5中文正式版
http://www.gougou.com/search?search=%CB%AE%BE%A7%B1%A8%B1%ED10.5%D6%D0%CE%C4%D5%FD%CA%BD%B0%E6&restype=-1&id=1
supermarket程序终于写好了,打包后却发现水晶报表不能用,原来还需要把水晶报表的程序安装在本地。下面是打包步骤,希望对用VS2008的同仁提供一点帮助。
迅雷下载:水晶报表10.5中文正式版
http://www.gougou.com/search?search=%CB%AE%BE%A7%B1%A8%B1%ED10.5%D6%D0%CE%C4%D5%FD%CA%BD%B0%E6&restype=-1&id=1
设计前台页面:
<Columns>
<asp:BoundField DataField="id" HeaderText="ID" />
<asp:BoundField DataField="wo" HeaderText="Production Order" />
<asp:TemplateField HeaderText="confirm">
<ItemTemplate>
<asp:TextBox ID="TextBox_confirm" runat="server" Text =<%# DataBinder.Eval(Container.DataItem,"onhand_confirm") %>></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
后台程序:
Page_Load里面必须要加上这句判断,其实任何一个有数据绑定的页面都需要加这一句:
if (!Page.IsPostBack)
{
databind();
}
在update数据的按钮事件上增加下面动作:
string connectionstrings = "server=sham1336;UID=sa;PWD=******;DataBase=supermarket";
SqlConnection connection = new SqlConnection(connectionstrings);
connection.Open();
//提交config数据
int i = 0;
while (i < GridView1.Rows.Count)
{
TextBox confirmbox = (TextBox)GridView1.Rows[i].FindControl("TextBox_confirm");
double confirmnum = 0;
if (confirmbox.Text.ToString().Trim() == "")
{
confirmnum = 0;
}
else
{
confirmnum = Convert.ToDouble(confirmbox.Text.ToString());
}
int configid = Convert.ToInt32(GridView1.Rows[i].Cells[0].Text.ToString());
string pullwipstring = "update pullwip set onhand_confirm = " + confirmnum +" where id = " + pullwipid;
SqlCommand pullwipcommd = new SqlCommand(pullwipstring, connection);
pullwipcommd.ExecuteNonQuery();
i++;
}
前两天,一朋友说想开发个C#的游戏。以前有做过C#的网页程序和桌面软件,但是开发游戏,还从来没接触过,今天查了一些资料。看来开发游戏和开发桌面软件,web程序还是两码事。开发游戏需要一个windows游戏开发平台,微软有一个与VS整合的开发平台,叫做XNA Game Studio 2.0,最新版本是3.0,但是要和VS2008一起使用,我用的是VS2005,所以下载了一个2.0版本的。
一直想开发个自己的twitter,记得一年半前,写了一些ASP程序,但是没写完,后来为了学习.NET还做了一个C#版本的twitter。但是没地方放,所以一直没有发行。前两天想起来要做一个任务管理器,然后写了一点程序,后来发现,我可以把以前的twitter和这个任务管理器整合在一起,正好元旦放假,花了整整两天的时间,终于把雏形做出来了——足迹.
可以供自己和朋友们记录一点生活,可以管理自己的目标计划。
欢迎使用——足迹——http://www.denghaigang.com/zuji
更多模仿Troy的www.ingbus.com
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[HostingEnvironmentException: Failed to access IIS metabase.]
System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +3500426
System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath.MapPath(String siteID, VirtualPath vpath) +9
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +163
System.Web.CachedPathData.GetConfigPathData(String configPath) +382
System.Web.CachedPathData.GetConfigPathData(String configPath) +243
System.Web.CachedPathData.GetApplicationPathData() +68
System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +3393747
System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +189
解决办法:
在CMD中进入目录C:WINDOWSMicrosoft.NETFrameworkv2.0.50727
运行:
C:WINNTMicrosoft.NETFrameworkv2.0.50727>aspnet_regiis.exe -i