在Wordpress中运行asp.net代码

时间:2012-12-25 14:47:16

标签: asp.net wordpress optimization

我在asp.net中编写了一些简单的代码:

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If TextBox1.Text = "30%off" Then
            Response.Redirect("http://www.google.com")
        Else
            MsgBox("Please Enter a Valid Coupon!")
        End If
    End Sub
End Class

现在我所做的是从我得到的调试输出源:

<form method="post" action="Default.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="OsC7M9VmZwGOYizZOWtmabCIp4X2NQYfYRFcdzfKSxsD49xOULNCTlEoDVRN+YXcWGszYY8WFsSxjzPjpz2y7ibXajRjMSlVqKd6QRRLU8A=" />
</div>

<div class="aspNetHidden">

    <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="7ypvqvaBZUfanEsFUMFtxAPFZCwRdYQbqGVJokLWdjwcfQ7ZvJx3zMwTvTvPmbzwDzuI6vbSwPSJhS4u5RX6OZHOxyXMabjHe+TtQ//Ium5NXK/5orWrR3k5816LVHY+CBovAFHhcndnueiaWFcrxQ==" />
</div>
    <div>

    &nbsp;<span id="Label1">PROMOTION CODE :</span>
        <input name="TextBox1" type="text" id="TextBox1" style="height:16px;width:211px;margin-left: 3px; margin-bottom: 0px" />
        <input type="submit" name="Button1" value="Enter" id="Button1" style="width:101px;margin-left: 1px" />

    </div>
    </form>

现在我要做的就是将其粘贴为Wordpress中的一个片段。但是,当我粘贴代码并按下提交按钮时,我找不到404;有没有办法像运行iframe等?

0 个答案:

没有答案