Reputation: 1
i have a class that is teaching asp.net in visual studio (i use the 2022 version). For now we are focusing on Design mode but for some reason my Design mode is broken. Everytime i use the Wizard tool (only one that i know of) it keeps saying "Error Rendering Control" here is a pic of the Error
my code doesn't have any problem because when i run it in the browser it works and when i gave the files to a few of my classmates it seems to be working for them too.
i would really appreciate any help you can give cause this is driving me nuts.
This is my code if you'd want to test it yourself.
ASP:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="Panel1" runat="server">
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" OnFinishedButtonClick="Wizard1_FinishButtonClick1" Width="500px" FinishCompleteButtonText="Finish" FinishPreviousButtonText="Back" StartNextButtonText="Next" StepNextButtonText="Next">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="About you">
<asp:Label ID="Label1" runat="server" Text="Name:"></asp:Label>
<asp:TextBox ID="name" runat="server"></asp:TextBox>
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" StepType="Finish" Title="Favorite Language">
<asp:DropDownList ID="FavoriteLanguage" runat="server">
<asp:ListItem>C#</asp:ListItem>
<asp:ListItem>Visual Basic</asp:ListItem>
<asp:ListItem>CSS</asp:ListItem>
</asp:DropDownList>
</asp:WizardStep>
<asp:WizardStep runat="server" StepType="Finish" Title="Ready">
<asp:Label ID="resualt" runat="server" Text="Label"></asp:Label>
<br />
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</asp:Panel>
</div>
</form>
</body>
</html>
C#: `
namespace WebApplication3
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
resualt.Text = "Your Name:" + name.Text;
resualt.Text += "<br />Your Favorite Language:" + FavoriteLanguage.SelectedValue;
}
}
}
`
i tried reinstalling, repairing and even downgrading to an older version but it won't work. Sometimes after reinstalling it will get fixed but when i close the app and reopen it will break again.
Upvotes: 0
Views: 534
Reputation: 1
Went to Tools -> import and Export Settings -> Reset all and my problem got fixed
Upvotes: 0
Reputation: 49039
Well, first of all, you don't have a "control of type view" in that page.
However, what I would do is make sure you install all of the bits and parts reuiqred for webforms.
Web forms are somewhat older now, and vs 2022 does not install all of the bits and parts and desingers required for such "older" type of projects based on webforms.
So, launch vs2022, (don't load a project).
Then from tools->Get Tools And features.
You should see this:
(and expand above)
Make sure you select these:
And these:
After that exit, vs, and restart.
Upvotes: 1