首页 \ 问答 \ 将ASP MVC Web应用程序作为桌面应用程序运行(Running ASP MVC web application as desktop application)

将ASP MVC Web应用程序作为桌面应用程序运行(Running ASP MVC web application as desktop application)

我正在学习使用ASP MVC 5创建Web应用程序一段时间,我真的很喜欢MVC框架,使其变得简单。 我个人认为自己是桌面开发人员,但我羡慕Web应用程序提供的丰富用户界面。

我有一个想法,使用MVC框架创建一个桌面应用程序。 我的想法是我的网络应用程序将由本地iis epress托管。 服务器部分将访问所有机器资源并呈现为呈现的html。 我想在很大程度上依赖于MVC框架和Razor渲染引擎。

如果有人在过去做过,我会徘徊,并认为这不是一个坏主意。 我知道我可以在我的开发机器上的iis express下运行已编译的mvc dll,但是当我想将我的应用程序部署到没有iis或iis express的其他机器时,我该怎么办? 有没有办法在没有安装的情况下运行iis express?


I am learning about creating web application with ASP MVC 5 for some time and i really like the MVC framework for making it easy. I personally consider my self as desktop developer, but i look with envy on rich user interface that web application provide.

I have an idea to create a desktop application using MVC framework. The idea is that my web application would be hosted by local iis epress. The server part would access all machine resources and present as rendered html. And i would like to rely heavily on MVC framework and Razor rendering engine for that matter.

I wander if anybody did it in the past and also think that this is not a bad idea. I know that i could run compiled mvc dll under iis express on my dev machine, but what should i do when i want to deploy my app to other machine that doesn't have either iis or iis express? Is there a way to run iis express without installation?


原文:https://stackoverflow.com/questions/32447849
更新时间:2022-12-03 22:12

最满意答案

试试这段代码

public void onRadioButtonClicked(View view) {
// Is the button now checked?
boolean checked = ((RadioButton) view).isChecked();

// Check which radio button was clicked
switch(view.getId()) {
    case R.id.radioButton1:
        if (checked)
            // RadioButton id 1
        break;
    case R.id.radioButton2:
        if (checked)
            //RadioButton id 2
        break;
}

}


Try This code

public void onRadioButtonClicked(View view) {
// Is the button now checked?
boolean checked = ((RadioButton) view).isChecked();

// Check which radio button was clicked
switch(view.getId()) {
    case R.id.radioButton1:
        if (checked)
            // RadioButton id 1
        break;
    case R.id.radioButton2:
        if (checked)
            //RadioButton id 2
        break;
}

}

相关问答

更多
  • 在RadioButton项中添加一个Text项(带有所需名称),并为其指定相对x和y位置。 将RadioButton的text属性留空。 RadioButton { id: radioButtonID x: 319 // Button position y: 46 Text { x: -60 // Relative text position to the radio button y: 3 text: "R ...
  • 试试这段代码 public void onRadioButtonClicked(View view) { // Is the button now checked? boolean checked = ((RadioButton) view).isChecked(); // Check which radio button was clicked switch(view.getId()) { case R.id.radioButton1: if (checked) ...
  • 是的你可以: 您将同一个CheckChanged(或类似的)事件处理程序赋予每个单选按钮。 然后你把这样的代码: RadioButton btn = sender as RadioButton; if(btn!= null && btn.IsChecked) { Switch(btn.Name) { case "rbFrenchImpl": break; ... } } 这适用于所有类型的框架。 Yes you can: You subcribe th ...
  • 如果只能从可用选项列表中选择一个,则需要为两个RadioButtons设置GroupName 。 设置此属性后,一次只能选择指定组中的一个RadioButton :  Update When only one selection ...
  • 我认为以下代码可以帮助您: @foreach (var myValue in ViewBag.Scholarity) { string text = myValue.Text.ToString(); string val = myValue.Value.ToString(); @Html.RadioButton("ScholarityList", val); @text } 或者创建自定义HTML帮助器,如下所示: public static MvcH ...
  • 对我来说,带有构造函数图标的JRadioButton似乎不起作用; 它用给定的图标替换“原生单选按钮图标”。 我认为除了“单选按钮图标”之外,原始要求用于带图标的单选按钮。 使用Bug#4177248对Sun bug数据库的行为进行了一些争论,但没有进行任何更改。 相反,人们可以尝试JRadioButtonMenuItem ,即使可能会有一些非想要的行为吗? 对JRadioButton和JRadioButtonMenuItem的简短评估: public class IconRadioButtonEval { ...
  • 我有同样的问题。 我以这种方式绕过它: public class MainActivity extends AppCompatActivity { private boolean check=false; ... ... ... public void checked(View arg0) { if(!check) check=true; else check=false; } ... ... ... } 然后在RadioButton的布局中你必须设置 andro ...
  • 正如@matt所说,你无法添加UIAlertView或UIAlertController接口。 你可以添加ssradion按钮来查看。 let radioButton = SSRadioButton(frame: CGRect(x: 0, y: 0, width: 100, height: 20 )) radioButton.circleRadius = 8 radioButton.circleColor = UIColor.redColor() ...
  • 我没有看到sex是什么价值None ,但我确实看到它是空字符串, '' 。 您正在创建和设置新窗口时立即执行sex = var.get() Toplevel()顺便说一下,应该使用Toplevel() ,而不是另一个根对象)。 因为那时没有set() ,所以它是空字符串'' 。 稍后更改该按钮的选定值不会影响该保存的值。 相反,删除sex = var.get()并仅在单击“保存”按钮时检索单选按钮的值,就像您已经在处理所有其他输入的数据一样: ...save_data(var.get(), age_entr ...
  • 位置是表示控件左上角相对于其容器左上角的Point。 尝试 radioButton1.Location = new System.Drawing.Point(0, (250+(10*i))); Location is the Point that represents the upper-left corner of the control relative to the upper-left corner of its container. try radioButton1.Location = new ...

相关文章

更多

最新问答

更多
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • 电脑高中毕业学习去哪里培训
  • 电脑系统专业就业状况如何啊?
  • IEnumerable linq表达式(IEnumerable linq expressions)
  • 如何在Spring测试中连接依赖关系(How to wire dependencies in Spring tests)
  • Solr可以在没有Lucene的情况下运行吗?(Can Solr run without Lucene?)
  • 如何保证Task在当前线程上同步运行?(How to guarantee that a Task runs synchronously on the current thread?)
  • 在保持每列的类的同时向数据框添加行(Adding row to data frame while maintaining the class of each column)
  • 的?(The ? marks in emacs/haskell and ghc mode)
  • 一个线程可以调用SuspendThread传递自己的线程ID吗?(Can a thread call SuspendThread passing its own thread ID?)
  • 延迟socket.io响应,并“警告 - websocket连接无效”(Delayed socket.io response, and “warn - websocket connection invalid”)
  • 悬停时的图像转换(Image transition on hover)
  • IIS 7.5仅显示homecontroller(IIS 7.5 only shows homecontroller)
  • 没有JavaScript的复选框“关闭”值(Checkbox 'off' value without JavaScript)
  • java分布式框架有哪些
  • Python:填写表单并点击按钮确认[关闭](Python: fill out a form and confirm with a button click [closed])
  • PHP将文件链接到根文件目录(PHP Linking Files to Root File Directory)
  • 我如何删除ListView中的项目?(How I can remove a item in my ListView?)
  • 您是否必须为TFS(云)中的每个BUG创建一个TASK以跟踪时间?(Do you have to create a TASK for every BUG in TFS (Cloud) to track time?)
  • typoscript TMENU ATagParams小写(typoscript TMENU ATagParams lowercase)
  • 武陟会计培训类的学校哪个好点?
  • 从链接中删除文本修饰(Remove text decoration from links)