Hi,
I have a database that has primary key fields in its tables, but the FK mappings are not in place.
What are the ramifications of this when using linq-to-sql?
Hi,
I am creating an ASP.NET custom control.
I want to set the body onload event of the ASPX page where the control resides.
Please note I cannot rely on the body tag in the ASPX page having runat="server".
any ideas??
Cheers.
the Text property of control on winform is always string type, so if i wanna expose property of other type for custom control, i have to do the conversion as following, if i have dozens of properties to expose, it will be such pain for me.
public int ImageGroupLength
{
get
{
return int.Parse(this.imageGroupLength.Text);
}
set
{
this.imageGroupLength.Text = value.ToString();
}
}
so, is there any elegant way to do the conversion?
I've got validation working with DataAnnotations on all my models, but I'd like to display an indicator for required fields on page load. Since I've got all my validation centralized, I'd rather not hard-code indicators in the View. Calling validation on load would show the validation summary. Has anyone found a good way of letting the model determine what's required, but checking it upon rendering the view, similar to Html.ValidationMessageFor?
When I run the custom tool to create the cs files for SubSonic all the templates now inject a letter g to the top of the cs files. To get this to compile I need to remove the g from the ActiveRecord.cs, Struts.cs, Context.cs and StoredProcedures.cs. Anyone else run into this? I am using MySQL.
I have an admin page with inlines. In each inline, I want to put some custom text with link to the regular admin page for the object from that inline. Is this possible without customizing/hacking admin templates?
I have a table with a collection of orders. The fields are:
customerName (text)
DateOfOrder (datetime).
I would like to show totals of orders per week per customer. I would like to have it arranged for the Friday of each week so that it looks like this:
all dates follow mm/dd/yyyy
"bobs pizza", 3/5/2010, 10
"the phone co",3/5/2010,5
"bobs pizza", 3/12/2010, 3
"the phone co",3/12/2010,11
Could somebody please show me how to do this?
Thanks
I'm building a web app with custom components. I need a way to route requests to class / methods, is there any standalone java library that can achieve that (in a sexy manner [1]) ?
[1] read : no xml!
Hi,
what is the suggested way to make web app see new configuration in web.config ?
restart IIS
stop/start app pool
recycle app pool
custom web page that does something in code?
Thanks,Pawel
In one of fields like this:
<div class="editor-field" >
<%= Html.TextBoxFor(model => model.Engineer1Id)%>
<%= Html.ValidationMessageFor(model => model.Engineer1Id) %>
</div>
I try to pass data with JQuery:
var Id = $(this).attr("rel");
$("#Engineer1Id").append(Id);
Why data doesn't put in specified field
One year ago Mitchel Sellers had a related question...
I would like to access the Google IMAP for sending and receiving email messages within my custom application.
The point is that i would not like to use any third party controls.
Newer versions of the .Net Framework support IMAP? What options do i have?
Hello all
I have installed the LogoTool module, but I only want it enabled in the custom theme used for the front end site, not for the Garland theme used in the administrative back end. How do I do that?
Best regards, Egil.
When tapping a UIButton of type UIButtonTypeInfoLight you get a nice shine effect around the button. Is it possible to add this effect to custom UIButtons?
It's my first time trying to make anything really interesting in C# and I was trying to make a simple form or game screen where the user could define a custom resolution/screen ratio etc. or to automatically detect the max screen size/ratio and output? its my first game, so I was wondering if it was possible or if there would be any major issues with such, rather than just setting it to 1366x768 (the resolution of all of my computers).
Thanks in advance for any assistance.
Hi,
I have an object with large number of similar fields (like more than 10 of them) and I have to assign them values from an array of variable length. The solution would be either a huge nested bunch of ifs based on checking length of array each time and assigning each field
OR
a chain of ifs checking on whether the length is out of bounds and assigning each time after that check.
Both seem to be repetitive. Is there a better solution ?
Can anyone suggest a good implementation of a generic collection class that implements the IBindingListView & IBindingList interfaces and provides Filtering and Searching capabilities?
I see my current options as:
Using a class that someone else has written and tested
Inheriting from BindingList, and implementing the IBindingListView interfaces
Write a custom collection from scratch, implementing IBindingListView and IBindingList.
Obviously, the first option is my preferred choice.
Thanking you.
I am designing a Shared Add-in for Excel in Csharp and now i am adding the custom menu in OnStartupComplete event but now i want this to be moved to WindowActivate event. I have added the event but it is not firing. Please help me
I have a DB4O server listening on a port
IObjectServer server = Db4oClientServer.OpenServer("filename.db40", 11978);
How do i register for callbacks? For example how do i execute some custom code before an object is read or stored?
I have the following CPython code which I now try to run in IronPython:
import ctypes
class BarHeader(ctypes.Structure):
_fields_ = [
("id", ctypes.c_char * 4),
("version", ctypes.c_uint32)]
bar_file = open("data.bar", "rb")
header_raw = bar_file.read(ctypes.sizeof(BarHeader))
header = BarHeader.from_buffer_copy(header_raw)
The last line raises this exception: TypeError: expected array, got str
I tried BarHeader.from_buffer_copy(bytes(header_raw)) instead of the above, but then the exception message changes to TypeError: expected array, got bytes.
Any idea what I'm doing wrong?
Hi,
I need to figure how much time passed between 2 times. For example:
(14:00:00 - 13:15:00) * 24 = .75
I need this to later on convert KW to KWh, but that's not the point.
I can not find out how to do this in PL/SQL.
My date/time fields look like this in the DB:
1/23/2010 21:00:00
I would appreciate any suggestions.
Steve
I have a table with 11 columns, but I need to get only 2 of them in my application, I'm using spring/hibernate/DAO combination. For now I have a domain class which includes all 11 fields, and mapping file which maps all 11 columns in table. How do I use get just 2 of them not all?
If I have four rows for a field with different values with other fields similar and then other four rows with same condition, as given below
here u can see there different rows for insert with only difference in the "newvalue" and "field" excluding "id" for the table_name=jos_menu, operation=INSERT and live=0
now here what select query should be used to get only single row from the table on every change of table_name...??
How can I gain access to Core Data objects from Javascript/WebKit on Mac OS X? I've made custom subclasses of NSManagedObject for each of my tables, with accessors defined using @property/@dynamic for each attribute, but neither isSelectorExcludedFromWebScript: or isKeyExcludedFromWebScript: is called for any of them, so Javascript just stops when I try to access any of the attributes. It returns 'undefined' if I access it as a property (eg business.name ) and javascript execution stops if I access it as a function (eg business.name() ).
From what I understand, the object state is just stored (values for fields, etc.), however, the execution context is anyways going to be lost.
What's the point of this? What bad can happen if so?
Note* this was taken from Effective Java By Joshua Bloch
Hi,
in the old days, with asp.net, when i would navigate to a non existing page, the .net framework (or iis?) would throw a 404 and i could attach a default page to that error in the web.config in the custom errors section.
but in the asp.net mvc that doesn't seem to work? Does the mvc framework throws some kind of invalid route excpetion saying it can't find any route for my uri or something like that?