We are having MVC application which reads data from MSMQ.
We are trying to find out a way to read message from queue and remove it from queue only if user has done a successful operation on the queue.
The message should remain in the queue until user completes the processing, the message should not be available to anyone else until the u...
Ok - I'm pulling my hair out over what I thought was a simple scenario: create a custom Label for bilingual use that contained two additional properties (EnglishText, FrenchText). Currently its structured like this:
Public Class myCustomLabel
Inherits System.Windows.Controls.Label
Public myEnglishTextProperty As DependencyProp...
I am having a hard time figuring out how to get the property list file that was created using Xcode. I created a property list file using array with NSString members. I want to grab that file and get all the NSString members and save it to a UITextField. But my problem is that I can't see that file. I don't know if I'm looking in the wro...
This is driving me crazy.
I have a very simple user control:
public int? ImageId {set; get;}
protected void Page_Load(object sender, EventArgs e)
{
... do something with ImageId...
}
And then I put this control on the page with ListView within UpdatePanel:
<asp:ListView ID="ListViewImages" runat="server" DataSourceID="src">
...
Which is the better practice and why?
bool IsTodayMonday { get { return DateTime.Now.DayOfWeek == DayOfWeek.Monday; } }
Or
bool IsTodayMonday()
{
return DateTime.Now.DayOfWeek == DayOfWeek.Monday;
}
...
If you look at the DataGridViewTextBoxCell property, ValueType, in reflector, you can see it overrides a property from DataGridViewCell.
The strange thing is, is that the overriden property is readonly, but the property in the parent class is read and write.
I can only presume that the property has been shadowed and reflector doesn't ....
Does anybody know how I can write "cardImage1.BorderStyle = BorderStyle.Fixed3D;" without having to explicitly declare "cardImage1"?
I'm trying to put it into a method so that I don't need to write the code to toggle between two Border Styles when a Picture Box is clicked, for every single single picture box (there are 52!)
e.g. for e...
According to the definition :
"As interface is not an object by itself ,I can't initialize it.If interface were allowed to declare fileds, then it needs storage location,so we can not declare fields inside interface."
Incase of property say example
when i declare
string SayHello { get; set; }
inside the interface
It is in...
I found the following syntax as a VB.NET property and I'm trying to convert it to c#, but I'm not sure how to accomplish that.
Public Property SomeText(ByVal someEnumThing as SomeEnum) As String
Get
Select Case someEnumThing
//figure out what string to return
End Select
End Get
Set(ByVal Value as ...
I'm new to asp.net mvc, but I'm trying to do an funny app with GDI+ and I need to do some image view with asp.net mvc.
I have a Model which has an image property:
namespace DomainModel.Entities
{
public class BackgroundImage
{
// Properties
public Image Image {get; private set; }
public BackgroundImage(...
Hi everyone,
I'm just trying to work out the best way to replicate a pretty useful feature of Windows' Forms.Panel in Java. Basically, when you disable a Windows Forms.Panel, all child control's are set to disabled too. However, their enabled property is preserved such that, when the the Panel is enabled again, any child control that wa...
Hi all...
This function is called from the form_onload. I am basically reading the registry, determining which checkboxes are checkmarked, and then reflecting that in the GUI.
Is there any way to condense this and write better code? How about using CheckState property?
Thanks.
Woody
private void checkExcelSettings()
{
//...
hello,
can someone please explain to me how i can get the Text property of the linklabel that i have created at runtime?
I have tried:
string str = e.Link.LinkData;
...but that just displays an empty messagebox.
Thanks lots :)
...
Hello,
I would like to create an Attribute to put on properties.
The properties that will contains this attribute will execute another method after setting a new value.
For example:
[MethodExecute(Log)]
[MethodExecute(Save)]
public string Name
{
get
{
return name;
}
set
...
Hello
I wonder if anyone can advise on a Java webapp question?
I have a set standard Java class which has methods to set and get values of a property file. These methods are used system wide and are called by servlets and non-servlet class methods alike.
But what I would like to do is to use a ServletContextListener to set the paths ...
Can someone explain why this is occurring? The code below was executed in the immediate window in vs2008. The prop is an Int32 property (id column) on an object created by the entity framework.
The objects entity and defaultEntity were created using Activator.CreateInstance();
Convert.ChangeType(prop.GetValue(entity, null), prop.Prop...
I am not sure what is causing the StackOverflowException when I try to overwrite a get and set function. When I just use the default get and set it works.
enum MyEnumType
{
....
}
public MyEnumType data { get; set; }
But when I try to add additional data, it throws a StackOverflowException
public MyEnumType data
{
get
{
re...
I have created a user control which exposes a custom type property called SoftwareItem. The page where I have placed this user control has a page property of the same type. I cannot figure out how to pass the page's property to the user control. I understand that this can be done in the code_behind but wanted to set the property declarat...
Is it possible to attach a List of strings to a String property so that the user can select one of the strings from the Properties window? Should I implement ICollection or something of that sort?
...
Where is the documentation for valid property names in .NET? Obviously things like space, * or & aren't valid in a property name, but where is this documented?
...