I want to write filtering controls which take object type T and property name and return Expression<Func<T, bool>> that checks value of passed property. I don't want to use reflection because I'm afraid such expressions can't be used by EF. I can't use delegates because C# doesn't have delegates for properties. What can I do? Maybe I sho...
Dim a as Type=GetType(className) would gimme the type. But I have only the name of the class as string. I want something like GetType("class1") which would return the type.
...
I am trying to load a sortable jqgrid 3.5 from a query with multiple joins in it and having much difficulty as I am a novice with both Linq and jqgrid. In order to allow for sorting I first was attempting to load it using dynamic sql. Since I am pulling columns from multiple tables I assume my return will be a class object which I will p...
I am trying to better understand basic concepts in OOP.
What are static and dynamic variables and methods in object-oriented programming?
What is, for instance, the difference between using $this vs. double colon (::)?
$this ($this->a_method())
Advantages: ?.
Disadvantages: ? ... "this" is not self-documenting as in: $this->method_fr...
Hi,
I am trying to serialize something based upon meeting particular criteria.
To this end my original hope was to use attributes containing a lambda expression on an object's properties.
However, as this cannot be done I've settled for having a Func<T,bool> member within the class and passing the type (or first parameter type) and na...
Hi,
I am creating a search using listview. when user enter a word in search, I am generating a listview with the results.
Now, there will be tags in each listview row. When, user clicks the tag, again a search happens using the value in the tag. There may be any number of tags for each listview row. I have to generate linkbuttons for t...
When iterating through a set of assemblies, e.g. AppDomain.CurrentDomain.GetAssemblies(), dynamic assemblies will throw a NotSuportedException if you try to access properties like CodeBase. How can you tell that an assembly is dynamic without triggering and catching the NotSupportedException?
...
Is there a way to dynamically create properties at runtime in VB .NET using introspection?
e.g. Suppose I had a class
Public Class Foo
Public Property Bar() As String
get
...
end get
set(ByVal value As String)
...
end set
End Class
Is there a way to create property Bar at runtime?
T...
I have this weird problem when putting textboxes on the page in reverse. The whole event system is messed up. Changing one textbox fires TextChange on all textboxes. I can fix this by putting the controls in a list first and then call add while iterating trough the list in reverse. But i just want to know why this fails. Heres some code ...
I'm working on a fun 'survey' form and am trying to break up the tedium by over complicating the process. I have a group of radiobuttonlists that I want to dynamically create from a string of names and a string of values. The values is not a problem. It's creating all the radiobuttonlists that I can't figure out.
For instance I could j...
Hello Members,
I need your help in C# code. I need to create 5 buttons dynamically on windows form and each button should respond to click event. I tried it but all buttons are responding to same event.
...
I need a way to cast an object to a type that is not know at compiler time.
something like this:
object obj;
public (type of obj) Obj
{
get
{
return obj
}
set
{
obj = (type of obj)value;
}
}
The only thing that is know is that obj is a value type.
I doubt that something like this would be pos...
would like your comments.
Eg: When user first visit www.testing.com/productdetailpage.asp
I will use caching- store the whole page into productdetailpage.html
When the user go to reopen productdetailpage.asp, user will be redirected to www.testing.com/productdetailpage.html
It means they will see productdetailpage.html, not .asp
Is ...
Hello,
I have made a one form with functionality to create grid view dynamically.
i have used concept of "how to create template columns dynamically in a grid view"
Link : http://www.codeproject.com/KB/aspnet/DynamicTemplateColumn.aspx
its working good.
i am creating control run time set the different property of control and bind it...
I have a bound ListBox in WPF where each item has an up / down button to move the item up or down in the list box.
However I need to know which button fired the event so I want to set the name of the button to "UpButton" + listBoxItem.Text type of thing.
Here's a simplified version of the XAML
<ListBox>
<ListBox.ItemTemplate>
...
These are the 2 sets of activities :
//#1
List<object> AFilterObject = A_List.SelectedList;
List<A> AFilters = new List<A>();
foreach (Aitem in AFilterObject )
{
//Do activity X
}
//#2
List<object> BFilterObj = B_List.SelectedList;
List<B> payopFilters =...
I'm building a site and I would like to have external content dynamically loaded in a div using jQuery. The content could be a google search page, where one can navigate without actually leaving the site. Could someone exploit this and drive to a content of his own and run malicious code inside my site? Are there ways to prevent this? Is...
I have to make an image of a dynamic page i.e. the page keeps on changing in every 5 minutes.
I want to make images of that very page that keeps on changing so that i can have its records saved in the form of images.
How can i do that using php??
i have no idea about this and a little elaboration in answers will be highly appreciated!!...
I do a bunch of json requests with dynamic script tags. Is it possible to detect if there's an error in the request (eg. 503 error, 404 error) and run something on detection of the error?
...
I haven't explained this well.
But what i mean is, if I have an ajax script that loads the content of a page in a DIV element, through the function 'loadpage('whatever.php');, instead of going around manually doing this to all links, is there a way of having a script that automatically makes all regular links load through that ajax func...