我不认为有任何菜单选项可以在文本编辑器中查看空格.
有一个类似的问题在这里,然而,这指的是SSMS快递2005年.这个问题的答案显示了如何通过编辑注册表值来启用空白查看.但是,我没有在我的注册表中指定该路径.(我已经检查了SQL Server注册表中的每个目录,但找不到"Visible Whitespace"条目)
我在用 SQL Server Management Studio 2016 (v 13.0.15500.91)
当然必须有办法实现这一目标.这不是真的需要,但我希望我的设置与我的其他版本的SSMS相匹配.
我正在使用带有Razor引擎的ASP.net MVC 4.
我有一个页面(Index.cshtml)和一个控制器(HomeController.cs)
我试图将我的提交按钮连接到我的控制器中的动作结果 - 但是我似乎无法解决它.
我的HTML:
@using (Html.BeginForm("SubmitForm", "Home", FormMethod.Post))
{
<div class="main-Background">
******lots of other html here*******
<button type="submit" id="btnSave">Save</button>
</div>
}
Run Code Online (Sandbox Code Playgroud)
我的控制器:
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
return View();
}
public ActionResult About()
{
ViewBag.Message = "Your app description page.";
return View();
}
public ActionResult Contact()
{
ViewBag.Message = "Your contact page.";
return View();
}
[HttpPost]
public ActionResult SubmitForm()
{ …Run Code Online (Sandbox Code Playgroud) 我在后面的代码中设置我的数据上下文,并在XAML中设置绑定.调试显示我的数据上下文正在从我的模型填充,但这并没有反映在我的视图中.
可能是简单的事情,但这让我困扰了好几个小时.
public partial class MainWindow : Window
{
public MainWindow(MainWindowVM MainVM)
{
this.DataContext = MainVM;
InitializeComponent();
}
}
public class MainWindowVM : INotifyPropertyChanged
{
private ICommand m_ButtonCommand;
public User UserModel = new User();
public DataAccess _DA = new DataAccess();
public MainWindowVM(string email)
{
UserModel = _DA.GetUser(UserModel, email);
//ButtonCommand = new RelayCommand(new Action<object>(ShowMessage));
}
}
public class User : INotifyPropertyChanged
{
private int _ID;
private string _FirstName;
private string _SurName;
private string _Email;
private string _ContactNo;
private List<int> _allocatedLines;
public …Run Code Online (Sandbox Code Playgroud) 我正在尝试根据集合中的项目数动态创建标签.
我的模型传递给我的视图很好,但是当迭代集合时 - 我无法获得标签来显示字符串列表的值.
例如,我使用以下代码:
@foreach (var ac in model.myClass.listofstring)
{
@Html.LabelFor(a => ac)
}
Run Code Online (Sandbox Code Playgroud)
如果集合有4个项目,上面的代码将输出"acacacac"我希望它输出4个标签,列表中的项目的字符串值.
我也试过@Html.LabelFor(a => ac.ToString()), @Html.LabelFor(a => ac.ToString)但视图然后没有呈现.
我知道值在列表中,因为我可以在我的控制器中访问它们.test在我看来,价值是我想要的.
foreach (var ac in myClass.listofstring)
{
var test = ac.ToString();
}
Run Code Online (Sandbox Code Playgroud)
我也试过这个,没有运气:
@for (var i = 0; i < model.myClass.listofstring.Count(); i++)
{
@Html.LabelFor(a => a[i])
}
Run Code Online (Sandbox Code Playgroud) 我只是在学习C语言
我写了以下内容:
void main(void)
{
unsigned int curr_dat = 0; // The current dat file to use
unsigned char ch = 0; // Key entered at keyboard
unsigned char lastkey = 0; // Last key entered (movement command)
FILE *fp;
}
Run Code Online (Sandbox Code Playgroud)
但是,我在尝试编译时遇到这些错误:
error C2065: 'FILE' : undeclared identifier
error C2065: 'fp' : undeclared identifier
warning C4552: '*' : operator has no effect; expected operator with side-effect
我不确定为什么我相信FILE是C中的有效标识符
我正在使用VS2012的Developer Command Prompt进行编译
c# ×3
asp.net-mvc ×2
razor ×2
asp.net ×1
c ×1
datacontext ×1
mvvm ×1
ssms ×1
ssms-2016 ×1
whitespace ×1
wpf ×1
xaml ×1