在Visual Studio 2013视图中双击表单会在我的html页面中插入脚本,而不是在c#页面

时间:2016-05-20 13:59:17

标签: c# visual-studio

我需要帮助。下面是我在设计页面上双击提交按钮时在代码中注入的内容。

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Tutorial.WebForm1" %>

<!DOCTYPE html>
<script runat="server">

    protected void Button1_Click(object sender, EventArgs e)
    {

    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            width: 115%;
            height: 415px;
        }
        .auto-style2 {
            width: 541px;
            text-align: right;
        }
        .auto-style3 {
            height: 73px;
        }
        .auto-style4 {
            height: 44px;
        }
    </style>
 </head>
 <body>
    <form id="form1" runat="server">
        <table class="auto-style1">

0 个答案:

没有答案