警报脚本出错

时间:2017-06-05 05:24:14

标签: asp.net vb.net alert

我在VB.net中使用以下警报脚本

Response.Write("<script language=""javascript"">alert('please select the data first!');</script>")

但在执行代码后,我的菜单表在执行代码enter image description here之前增强了enter image description here菜单 导致这种异常变化的代码有问题。

菜单asp.net代码如下:

<table align ="right"  width="400" border="1" class="table" style="border: thin outset #000000; background-image: url('Images/Red.png'); color: #FFFFFF;">
    <tr>
        <td>
            <asp:Button ID="btnConvert" runat="server" AutoPostBack="true" Text="Convert to Pipeline" ValidationGroup="ChangeStatus"  />
        </td>
        <td class="auto-style8">
            <a href="CreateRecords.aspx" style="color: #FFFFFF">||Home</a>
            <div class="item-container">
            </div>
        </td>  
        <td class="auto-style8">
            <a href="Reports.aspx" style="color: #FFFFFF">||Reports</a>
            <div class="item-container">
            </div>
        </td>
    </tr>
</table>

1 个答案:

答案 0 :(得分:0)

ScriptManager.RegisterStartupScript(Page, GetType(Page), "somekey", "alert('please select the data first!');", True)