Asp,后面的网络代码在godaddy共享窗口计划中不起作用 [英] Asp, net code behind doesn't work in godaddy shared windows plan

查看:60
本文介绍了Asp,后面的网络代码在godaddy共享窗口计划中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的代码中显示一个简单的Hello World,但注意到Godaddy共享环境不起作用。没有错误,没有,它只显示我在ASP.net页面中的内容,但没有显示后面的代码。



Default.aspx.cs



I'm trying to display a simple Hello World in my code behind but noticing that in Godaddy share environment is not working. No error, nothing, it only display what I have in my ASP.net page but not going to the code behind.

Default.aspx.cs

using System;
using System.Web.UI;
using System.Net.Mail;

namespace cafeda
{
    public partial class Default : Page
    {
        protected void Page_Load(object sender, EventArgs e){
          Response.Write("Hello World! Page has not been posted back.");
          if (IsPostBack){`enter code here`
             Response.Write("Hello World! Page has been posted back.");
          }
     }
}



任何想法。谢谢!



我的尝试:



它正在工作正确地方。没有显示任何错误,只是没有去页面背后的代码



任何想法。谢谢!


Any ideas. Thank you!

What I have tried:

It is working correctly local. Is not showing any error, just not going to the code behind page

Any ideas. Thank you!

推荐答案

请检查您是否在用于部署网站的文件夹中部署代码。在您的网站上&域页面,检查映射到您的网站的文件夹。如果您的映射文件夹应为Website at,则标记为您。



另外,检查default.aspx是否设置为默认页面。
Please check if you are deploying your code inside the folder which is used for deployment of the website. On your website & domain page, check the folder which is mapped to your website. Label against you should your mapped folder should be "Website at".

Also, check if you default.aspx is set as a default page.


这篇关于Asp,后面的网络代码在godaddy共享窗口计划中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆