小编ser*_*ads的帖子

在行动的情况下获得单选按钮的选定值

嗨,这是下面的代码,我尝试了很多东西,但我无法获得所选单选按钮的价值.你可以看到我需要为不同的情况获得该值.

  <div style="display: inline-block">
        <div>
                <a href="/Login/LogOut">Log Out</a><span> Welcome </span>YS User 1 noName        </div>
        <br />
        <br />
        <br />
        <br />
        <input type="button" onclick="submitCreate();" value="New Survey" /><br />
        <input type="button" onclick="submitEdit();" value="Edit Survey" /><br />
        <input type="button" onclick="submitDelete();" value="Delete Survey" /><br />
        <input type="button" onclick="submitPreview();" value="Preview Survey" />
    </div>
    <div style="display: inline-block">
<div>
    <table class="MyTable"><thead><tr class="columnHead"><th scope="col"></th><th scope="col"><a href="/User/Index?sort=UserID&amp;sortdir=ASC">CreatedBy</a></th><th scope="col"><a href="/User/Index?sort=CreatedDate&amp;sortdir=ASC">Created Date</a></th><th scope="col"><a href="/User/Index?sort=IsRunning&amp;sortdir=ASC">Is Running</a></th></tr></thead><tbody><tr><td> <input name="selected" id="1" 

      type="radio" value="1" /></td><td>1</td><td>12/12/2011 3:43:57 PM</td><td>False</td></tr><tr class="altRow"><td> <input name="selected" id="2" 

      type="radio" value="2" …
Run Code Online (Sandbox Code Playgroud)

html javascript radio-button

7
推荐指数
1
解决办法
5万
查看次数

不在()语句中的lambda

有没有人知道我们如何使用lambda中不在()语句的地方?

this is where id in() statement

public List<abc> GetList(List<string> ID)
{
return db.abcs.Where(a => ID.Contains(a.id)).ToList<abc>();
}
Run Code Online (Sandbox Code Playgroud)

我想知道云是如何对立的."身份不在..."

c# lambda

6
推荐指数
1
解决办法
2万
查看次数

为什么 TempData[] 不适用于 IE

\xc4\xb0n 我的 MVC3 项目,有大量的 TempData[] 用于在操作之间传递数据。当我使用 Chrome 时,它​​的效果非常完美。但在 IE 中我无法获取 TempData[] 项的值。如果有人知道问题是什么以及我该如何解决它?

\n\n
public class SomeController : Controller\n{\n    public ActionResult SomeAction()\n    {\n        TempData["id"] = "someData";\n        return View();\n\n    }\n}\n\n\npublic class AnotherController : Controller\n{\n    public ActionResult AnotherAction()\n    {\n        string data = Convert.ToString(TempData["id"]);\n        return View();\n\n    }\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n

`

\n

internet-explorer google-chrome tempdata razor asp.net-mvc-3

4
推荐指数
1
解决办法
3343
查看次数

在winform应用中改变组合框的高度

我正在开发一种触摸屏设备的应用程序.为了方便用户,我需要改变组合框的大小.

我检查了很多东西,包括DrawItemEventHandlerMeasureItemEventHandler,但它没有按我的意愿工作.

基本上我想在不触及字体大小的情况下改变组合框的高度.当我更改组合框的字体大小时,它看起来像图像的左侧.如何设置看起来像图像右侧的组合框?

在此输入图像描述

顺便说一句,不知道它是否有效解决方案,我不是使用数组字符串.我绑定的数据就像.

 combobox.DisplayMember = "Name";
 combobox.ValueMember = "ID";
 combobox.DataSource = new BindingSource { DataSource = datalist };
Run Code Online (Sandbox Code Playgroud)

提前致谢.

有了TaW解决方案,我设法按照自己的意愿设置项目.当组合框项目没有下降时,我唯一无法在中间设置文本.如何将此文本位置设置为中心?

在此输入图像描述

c# size combobox winforms

3
推荐指数
1
解决办法
6513
查看次数