Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Fix Tab type or Namespace not found error #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ChannelGroupTabMVC/Views/Tab/Tab.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
<section style="width: 100%; display: table">
<div style="display:table-row">
<div style="width: auto; display:table-cell;">
@{ Tab gray = new Tab();
string g = ($"{@gray.GetColor()} gray!'");
@{
string g = ($"{@Model.GetGray()} gray!'");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cloned from master and made this change. I encountered NullReferenceException. The Tab controller is not returning ChannelGroup object causing the error. The fix is to return View(color) instead of View() in Tab() action.

<div id="gray" style="display:none;">@g</div>
}
</div>

<div style="display: table-cell">
@{ Tab red = new Tab();
string r = ($"{@red.GetColor()} red!'");
@{
string r = ($"{@Model.GetRed()} red!'");
<div id="red" style="display:none;">@r</div>
}

Expand Down