I do not have the property android:state_enabled for any of the controls. Typing it manually doesn't work either. I can only use the deprecated android:enabled.
I have the latest everything.
HTML has an input button type to reset all fields in a form to their initial state in one step: <input type="reset" ... />.
Is there a similar simple way to reset all form fields of an aspx page from code-behind? Or is it necessary to reset all controls one by one with TextBox1.Text=string.Empty, TextBox2.Text=string.Empty, etc. ?
Thanks in advance!
I need to display uploaded files on a web application, the flow is as follows
User uploads file through web UI
Validation on image
Makes call to imageRepository.store( uploadedImage, user.getSite() )
The user wants the image displayed which adds <img src="${anUploadedImage.getUrl()}"/>
but that is where I'm stuck, what can getUrl() do? The simple solution is to put it someplace and let Apache serve the file, but then I can't use the application to ensure that one user isn't modifying the URL to view other users files, which in this case is important
Its common to observe listview developments for webforms but no common in mvc. on the other hand for mvc I´m only finding grid views displaying tabular data.
In your opinion which is the best List view solution for asp.net mvc?.
Edited:
ok, finally I found a possibility. Kazi Manzur wrote a listview using telerik controls. http://weblogs.asp.net/rashid/archive/2010/03/24/creating-rich-view-components-in-asp-net-mvc.aspx
Why do people say that business logics should be implemented on the server side code (e.g. EJB) and not on the client application code?
The example that I have in mind is a business object validation on a EJB based architecture. Does it really have to be delegated to the EJB or is it ok to run it on the client before the object is sent to be server to be saved?
For some reason my code just isn't wanting to fire off any kind of OnKeyDown event. I don't know why. Can anyone tell me what I'm doing wrong?
<!DOCTYPE html>
<html lang="en">
<head>
<title>Canvas test</title>
<meta charset="utf-8" />
<link href="/bms/style.css" rel="stylesheet" />
<style>
body { text-align: center; background-color: #000000;}
canvas{ background-color: #ffffff;}
</style>
<script type="text/javascript">
var x = 50;
var y = 250;
var speed = 5;
function controls(event){
if(!e){
//for IE
e = window.event;
}
if(e.keyCode==37){//keyCode 37 is left arrow
x -= speed;
}
if(e.keyCode==39){ //keyCode 39 is right arrow
x += speed;
}
if(e.keyCode==38){//keyCode 37 is up arrow
y -= speed;
}
if(e.keyCode==40){ //keyCode 39 is down arrow
y += speed;
}
}
function update(){
document.onkeydown="controls(event);";
draw();
}
function draw(){
var canvas = document.getElementById('screen1');
if (canvas.getContext){
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'rgba(255,255,255,0.5)';
ctx.fillRect(0,0,500,500);
ctx.fillStyle = 'rgb(236,138,68)';
ctx.fillRect(x,y,25,25);
}
}
setInterval('update();', 1000/60);
</script>
</head>
<body>
<canvas id="screen1" width="500" height="500"></canvas>
</body>
</html>
Hi,
is there any possibility to send from formtastic form value of :string field like
- semantic_form_for :project do |form|
- form.inputs do
= form.input :task_ids, :as => :string
as Array? Currently value of this field is sending as String and i'd like to no parse this string in controller.
Also, could you give me idea - if task with submitted id is not found - what is best way to catch this situation - validation in controller or what?
The problem is where a class should be created in my code. An example is I have a UI class and a main logic class that controls other objects.
Should the main logic class create the UI object, or should the UI object create the instance of the main logic class?
An explanation of which method is best and why would be ideal.
Thanks.
Hi, Im trying to use jqeury ajax with MVC i can get it to post back to the action i want and it returns the ViewData objects with updated Data but never renders the HTML. I have i View which contains some MVC User Controls and i want them to update on a timer.
Here is my View Markup
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/PageWithSummaryViewAndTabs.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="FullCaseTitle" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="FullCaseContent" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
window.setInterval(test, 5000);
function test() {
jQuery.get("/PatientCase/RefreshEPRF", function(response) { });
}
</script>
<div id="loadingDiv" style="display:none">Updating</div>
<input id="refreshPatientCaseIndexButton" type="submit" visible="true" title="refresh" value="Refresh" />
<h2>Full Case</h2>
<div id="EPRFContent">
<%Html.RenderPartial(@"~/Views/PatientCase/SectionEPRF.ascx"); %>
<%Html.RenderPartial(@"~/Views/PatientCase/SectionDrugs.ascx"); %>
</div>
<div id="ImageContent">
<%Html.RenderPartial(@"~/Views/PatientCase/SectionImagery.ascx"); %
On postback i call a Action Called RefreshEPRF which loads just the required user controls again
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%Html.RenderPartial(@"~/Views/PatientCase/SectionEPRF.ascx"); %>
<%Html.RenderPartial(@"~/Views/PatientCase/SectionDrugs.ascx"); %>
And finaly the marpup in the control
<table id="detailstable">
<tr><td id="detailslablecolumn">Patient Name : </td><td>
<%
foreach (var item in (List<STS_Lite.Models.PatinetCase.EPRFItem>)ViewData["EPRF"])
{
if (item.datumItemId == 46)
{
if (item.Stroke)
{
%>
<img src="/PatientCaseIndex/InkImageData/GetInkImage/<%=ViewData["PatientCaseId"]%>/<%=ViewData["TemplateInstanceId"]%>/<%=item.TemplateItemId %>" />
<%
}
else
{%>
<%=item.Value.ToString()%>
<%}
break;
}
}
%></td></tr><table>
When i step through this code the ViewData in the user control has the new updated values but the page comes back with no new values. I have tried the jquery.get and ajax but with no luck.
Any help would be great thanks
suppose this scenario:
there is a design panel like XAML designer that i added some Controls on it(in run-time with create instance of some element and add it to RootLayout.Children). now i like manipulate some properties of one control(that i now which one) with something like this.
is there a any short approach to goal?
I need to change, for good, the scope of some controls from the default protected to protected friend
The problem is, if I change it manually, my change will be undone every time I open or change the front end of the page (.aspx).
Is it possible to force a scope on a control, like with winform?
Is there any possible way to find out if an email address exists in c#?
e.g. I have an email address like [email protected] or [email protected] How can I do the validation?
I'm using the sfGuardDoctrine plugin, and I would like to customize the form validation messages.
How could I acomplish this? I can't find anything in the documentation.
The only way I have found is to copy sfGuardValidatorUser.class into /apps/frontend/lib/validator, but I would like to know if there is some way to just override the error message, not override the entire validator...
Hi All
How we set or get focus on any control in cocoa.
like setfirstresponder
We have 2 control A and B, A is firstresponder
After action I want to set focus ob B control
and also how we get focus on a particular control
and how we notify that leave focus..... I need it in validation ....
I want to force user to fill a textfield and then go to next field..something like this
Thanks
Deepika
Hi friends,
I need to add checkbox controls in my form. I know that there is no such a control like checkbox in IPhone SDK. How do I do this. Give me some ideas plz.
Thanks in advance!
I'd like to implement the group by features for the default grid as it's available for the commercial grid like devexpress/infragistics et al, if you want a sample, see the 2nd image on http://www.devexpress.com/Products/NET/Controls/WinForms/Grid/dataoperations.xml
I'd think there's some pattern or better yet some opensource/free grid which does this already, if not, i would probably implement it if i can find the time (doubtful ! and esp since it's available so easily in most packages, if only i can convince the client to pay for a license ) & want to get some ideas/patterns on the same
I'm trying to get a completely custom Dialog or PopupWindow, without any of the default Android UI controls (title, background, buttons, whatever).
Is this possible at all? I've spent hours searching for this, but no luck... It seems like this should be easily possible, but I can't find it.
Preferably this would be by inflating a View from XML, but at this point anything that would just work would be nice.
Thanks.
I have three fragments as shown in below figure. I have added all these three fragments in LinearLayout using .xml file and when my launcher activity starts I load that .xml layout using setContentView.I have some controls on fragment2. Clicking on any one loads the
fragment4 programmatically using FragmentTransaction and commit method. This fragments is added to the screen but the problem is it take the whole screen area. What can be the problem?
How can we add a web page or a Windows Forms to the Outlook mail so that when I send a mail to a person he/she should be able to enter the data in the controls on the mail form?
The user should also have the ability to save the data directly from the mail, instead of opening my web or a Windows application and update the data.
Hi,
i have this problem:
I added to faces-config.xml in my webapp this line
fr
pt_BR
but when i try to access to the page with my browser set to language french i get english validation errors
what is wrong with my web-app?
Did I miss something?
Thank you in advance for your help!
I have a user control contained in a tabpage. The Form has set AutoScaleMode = AutoScaleMode.Font and the UserControl has set AutoScaleMode.Inherit.
Now when I enlarge the font size of the form then the font is enlarged in the user control too, but the controls contents are not scaled. If I explicitly set AutoScaleMode.Font on the user control then it works properly.
Shouldn't AutoScaleMode.Inherit work that way?
Hi
I am developing my user control using a textbox control using c#.net
now i want to add a smart tag to it same way as the built in controls are having
but i don't know how to do that please guide me
Thank You
Hardik Patadia
Can anyone help me on how to do this..
I have a ListView with Checkboxes in vb.net and what I want to do is when the user check the checkbox, the program ignore the response of the user in checking the checkbox, instead it leaves the checkbox uncheck..
This concern is uses for may validation..
Thanks for your positive response regarding this..