亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

C#報錯:事件"System.UI.Control.Load"只能出現在+=的左邊

C#報錯:事件"System.UI.Control.Load"只能出現在+=的左邊

C#
WentworthPeach 2017-07-11 10:23:02
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Data.SqlClient;using System.Linq;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;using System.Web.UI.Page;namespace practice1{??? public partial class WebForm1 : System.Web.UI.Page??? {??????? private void page_load(object sender, System.EventArgs e)??????? {??????????? SqlConnection myconnection = new SqlConnection("sever=localhost;uid=sa;pwd=sa");??????????? try??????????? {??????????????? myconnection.Open();??????????????? Response.Write("數據導入成功!");??????????? }??????????? catch??????????? {??????????????? Response.Write("數據導入失??!");??????????? }??????? }??????? override protected void OnInit(System.EventArgs e)??????? {??????????? InitiallizeComponent();??????????? base.OnInit(e);??????? }??????? private void InitiallizeComponent()??????? {??????????? this.Load = new System.EventHandler(this.page_load);??????? }??? }????? }
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 2329 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號