C#编写的代码运行后网页无法显示

问题描述

调用dll文件,在计算器页面点等号之后就收到网页无法显示的提示了,cs文件代码如下:usingSystem;usingSystem.Configuration;usingSystem.Data;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Xml.Linq;usingSystem.Runtime.InteropServices;usingSystem.Text;usingSystem.Globalization;publicpartialclass_Default:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}[DllImport("D:\Re_数据链接库文件\WebSite\WebSite7\mydll.dll",EntryPoint="mycalcu",CharSet=CharSet.Ansi,CallingConvention=CallingConvention.StdCall)]//[DllImport("mydll.dll")]publicstaticexternStringBuildermycalcu(StringBuilderdesti,StringBuilders1,StringBuilders2,StringBuilders3);//publicstaticexternInt32mycalcu(strings1,char[]s2,char[]s3);//publicstaticexternInt32mycalcu(IntPtrs1,IntPtrs2,IntPtrs3);[DllImport("D:\Re_数据链接库文件\WebSite\WebSite7\mydll.dll",EntryPoint="mydll_add",CharSet=CharSet.Ansi,CallingConvention=CallingConvention.StdCall)]publicstaticexternInt32mydll_add(Int32n,Int32m);protectedvoidButton1_Click(objectsender,EventArgse){byte[]bb=newbyte[333];StringBuilders1=newStringBuilder(3000);s1.Append(TextBox1.Text.Trim());StringBuilders2=newStringBuilder(600);s2.Append(TextBox5.Text.Trim());StringBuilders3=newStringBuilder(20);//s3.Append(TextBox3.Text);s3.Append(RadioButtonList2.SelectedItem.Value.ToString());//Button1.Text=s1.ToString();//Button1.Text=Convert.ToString(mydll_add(88,100));//Console.ReadLine();StringBuilders4=newStringBuilder(3000);s4.Append(s3);//TextBox4.Text=s3.ToString();//TextBox4.Text=mydll_add(3,5).ToString();TextBox4.Text=mycalcu(s4,s1,s2,s3).ToString();//b1=System.Text.Encoding.Default.GetBytes("88.000008");//b2=System.Text.Encoding.Default.GetBytes("0.000008");//b3=System.Text.Encoding.Default.GetBytes("0.000008");//TextBox4.Text=s1.ToString();//StringBuilders4=newStringBuilder(344);//s4.Append(mycalcu(refb1,refb2,refb3).ToString());/*Encodinge1=Encoding.GetEncoding(936);byte[]b1=e1.GetBytes("999+22");byte[]b2=e1.GetBytes("0.009");byte[]b3=e1.GetBytes("0999+22");mycalcufun=(mycalcu)//Button1.Text=mydll_add(99999,8).ToString();Console.ReadLine();Console.Write(mycalcu(s1,s2,s3));Console.ReadLine();Console.Write(s1);Console.ReadLine();*/}protectedvoidTextBox4_TextChanged(objectsender,EventArgse){//this.TextBox4.Text=TextBox1.Text;}protectedvoidButton37_Click(objectsender,EventArgse){TextBox1.Text="";TextBox4.Text="";TextBox5.Text="";}protectedvoidButton38_Click(objectsender,EventArgse){TextBox1.Text+="pi";}protectedvoidButton11_Click(objectsender,EventArgse){TextBox1.Text+="e";}protectedvoidButton15_Click(objectsender,EventArgse){TextBox1.Text+="(";}protectedvoidButton16_Click(objectsender,EventArgse){TextBox1.Text+=")";}protectedvoidButton2_Click(objectsender,EventArgse){TextBox1.Text+="sin(";}protectedvoidButton3_Click(objectsender,EventArgse){TextBox1.Text+="cos(";}protectedvoidButton4_Click(objectsender,EventArgse){TextBox1.Text+="tan(";}protectedvoidButton5_Click(objectsender,EventArgse){TextBox1.Text+="cot(";}protectedvoidButton6_Click(objectsender,EventArgse){TextBox1.Text+="arcsin(";}protectedvoidButton7_Click(objectsender,EventArgse){TextBox1.Text+="arccos(";}protectedvoidButton8_Click(objectsender,EventArgse){TextBox1.Text+="arctan(";}protectedvoidButton9_Click(objectsender,EventArgse){TextBox1.Text+="arccot(";}protectedvoidButton13_Click(objectsender,EventArgse){TextBox1.Text+="ln(";}protectedvoidButton12_Click(objectsender,EventArgse){TextBox1.Text+="log(";}protectedvoidButton14_Click(objectsender,EventArgse){TextBox1.Text+="^";}protectedvoidButton32_Click(objectsender,EventArgse){TextBox1.Text+="factorial(";}protectedvoidButton34_Click(objectsender,EventArgse){TextBox1.Text+="ceil(";}protectedvoidButton33_Click(objectsender,EventArgse){TextBox1.Text+="floor(";}protectedvoidButton17_Click(objectsender,EventArgse){TextBox1.Text+="0";}protectedvoidButton18_Click(objectsender,EventArgse){TextBox1.Text+=".";}protectedvoidButton19_Click(objectsender,EventArgse){TextBox1.Text+="1";}protectedvoidButton20_Click(objectsender,EventArgse){TextBox1.Text+="2";}protectedvoidButton21_Click(objectsender,EventArgse){TextBox1.Text+="3";}protectedvoidButton22_Click(objectsender,EventArgse){TextBox1.Text+="4";}protectedvoidButton23_Click(objectsender,EventArgse){TextBox1.Text+="5";}protectedvoidButton24_Click(objectsender,EventArgse){TextBox1.Text+="6";}protectedvoidButton25_Click(objectsender,EventArgse){TextBox1.Text+="7";}protectedvoidButton26_Click(objectsender,EventArgse){TextBox1.Text+="8";}protectedvoidButton27_Click(objectsender,EventArgse){TextBox1.Text+="9";}protectedvoidButton36_Click(objectsender,EventArgse){TextBox1.Text="";}protectedvoidButton28_Click(objectsender,EventArgse){TextBox1.Text+="+";}protectedvoidButton29_Click(objectsender,EventArgse){TextBox1.Text+="-";}protectedvoidButton30_Click(objectsender,EventArgse){TextBox1.Text+="*";}protectedvoidButton31_Click(objectsender,EventArgse){TextBox1.Text+="/";}protectedvoidButton35_Click(objectsender,EventArgse){if(TextBox1.Text.Length!=0){TextBox1.Text=TextBox1.Text.Remove(TextBox1.Text.Length-1);}}protectedvoidButton41_Click(objectsender,EventArgse){TextBox1.Text+="exp(";}protectedvoidTextBox1_TextChanged(objectsender,EventArgse){}protectedvoidTextBox5_TextChanged(objectsender,EventArgse){}protectedvoidRadioButtonList2_SelectedIndexChanged(objectsender,EventArgse){}}

时间: 2024-07-31 19:50:19

C#编写的代码运行后网页无法显示的相关文章

编程语言-c#我这样写代码后,为什么运行后窗体不显示picturebox中的图片,要怎样才能显示

问题描述 c#我这样写代码后,为什么运行后窗体不显示picturebox中的图片,要怎样才能显示 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace _134022

大神帮忙看下面代码运行后怎么写入txt文件????

问题描述 大神帮忙看下面代码运行后怎么写入txt文件???? #include #include #include #include #include //输入/输出文件流类 using namespace std; const int Maxr=100;//最多的读者 const int Maxb=100;//最多的图书 const int Maxbor=5;//每位读者最多借五本书 //读者类,实现对读者的信息的描述 class Reader { private: int tag; //删除

为什么这段c语言代码运行后会崩溃?关于strtok函数

问题描述 为什么这段c语言代码运行后会崩溃?关于strtok函数 #include #include //strtok int main() { char *arry = "i love you China"; char *token = strtok( arry, " "); while( token != NULL) { printf("%s", token); token = strtok( NULL, " "); }

c c++编程-有没有大神看下 ,小弟刚学c++这个代码运行后输出str不是输出100为什么

问题描述 有没有大神看下 ,小弟刚学c++这个代码运行后输出str不是输出100为什么 #include #include using namespace std; int main(void) { char *str = new char[100]; strcpy(str,"hello imooc"); cout << "*str"; delete[] str; system("pause"); return 0; } 解决方案 如

javascript load-关于load问题,以下代码运行后为什么没有弹出

问题描述 关于load问题,以下代码运行后为什么没有弹出 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <img id="myImage" src="http://www.baidu.c

微信-XStream使用中,给xml加CDATA的代码运行后,没有加上CDATA字段

问题描述 XStream使用中,给xml加CDATA的代码运行后,没有加上CDATA字段 该问题是在学习柳峰的微信公众号平台开发中遇到的,希望能得到大神们的解答 希望得到大神们的解答 解决方案 该问题是在学习柳峰的微信公众号平台开发基础课程第十节中遇到的,具体代码我附在后面,各位大神请看 package org.liufeng.test; import java.io.Writer; import org.liufeng.model.Person; import com.thoughtworks

一个Javascript 编写的代码编辑器_网页编辑器

EditArea : http://sourceforge.net/projects/editarea 特点:1. 一个 Javascript 编写的代码编辑器, 支持代码加亮, 缩进, 行号等特征; 2. A free javascript editor for source code. It allow to write well formated source code with line numerotation, tab support, search & replace (with

为什么下面的代码运行后会出现重复的输出?

问题描述 请大侠们帮帮忙! 谢谢 解决方案 解决方案二:打开后看到一堆乱码,你贴一下CODE解决方案三:<%@PageLanguage="VB"AutoEventWireup="false"CodeFile="Default.aspx.vb"Inherits="_Default"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN&quo

设置-eclipse中svn修改 代码更改后行头显示变化

问题描述 eclipse中svn修改 代码更改后行头显示变化 即代码修改后 行头会显示颜色变化,如下图所示,请问怎么设置