I'm trying to figure out the best way to reference a control on a form from within a module. Unfortunately the form is just an instance, so it's not as easy as calling form.control...
Dim ChildForm As New frmSearch
' Make it a child of this MDI form before showing it. '
ChildForm.MdiParent = Me
ChildForm.Show()
That f...
If I have a Type, is there some easy way to tell that it represents a nullable value type using Reflection? Ideally something a little cleaner (and more correct) than:
static bool IsNullable(Type type)
{
return type.IsValueType && type.Name.StartsWith("Nullable");
}
...
HI,
I am maintaining an application which talks to another application via soap.
When the calling application runs I tend to get time out errors which I need to handle but for some reason the calling application is not handling these two well (it needs to undo changes etc).
So in my test, I wanted to reproduce the time out error so I p...
hello guys,
i have a problem and hope that somebody can help me.
i am developing in vb.net. i have a gridview with a template field, in which i have a asp:image tag. But the browser dont show any image. i does not render the image. if i check the sourccode in the browser there is no image tag. But the visual web developer show the imag...
I created a MSI installer by using Visual Studio 2008. I have some temp files that need to be deleted after the installation, but the auto-repair feature bothers me. The auto-repair feature will be triggered by clicking the shortcut created by the installer. I am thinking about creating my own shortcut to avoid that auto-repair. I tried ...
Hi
Is there any way to retrive starting point and endpoing point of pathfigure ??
I was trying to use this method
GetPointAtFractionLength
but sometimes (I don't know why) this method throws an exception
...
Hey guys!
I need help with something that should be relatively simple.
Got the component installed in my project fine and added all of the necessary config entries.
I need to rewrite URLs following two rules (for canonilization/SEO
purposes):
1 - all URLs that don't have "www" need to be rewritten to include
it.
Example: user ty...
What would be the best way to compare big paragraphs of text in order to tell the differences apart. For example string A and string B are the same except for a few missing words, how would I highlight these?
Originally I thought of breaking it down into word arrays, and comparing the elements. However this breaks down when a word is ...
I'm serializing the data in my app using custom serialization i.e. each of the classes I'm storing has the [Serializable] attribute and implements ISerializable. The object graph being serialized is reasonably complex with lots of cross-references between the objects/classes. The serialization works, but it's pretty slow. :(
By putting ...
Hi,
I wanted to use a method I created inside a query coz i need to implement a peculiar type of filter...
return manager.Clients.SelectAll().Where(cli => cli.Name.SatisfyFilter(filter.Name) && cli.LastName.SatisfyFilter(filter.LastName) && cli.MiddleName.SatisfyFilter(filter.MiddleName)).ToList();
But i get the:
"Method 'Boolean Sa...
I haven't been able to find much good documentation for Castle's logging facility, but reading here gives me enough to work with. I have one question though, how do you obtain a logger in situations where you can't use properties. Two examples I can think of are in a static method or inside of a struct.
Bonus points for any useful docu...
In c# we can create delegates via a variety of means (e.g. Action<>, Func<>, delegate, lambdas, etc). But when you invoke those methods, you have to provide the parameter values for the delegate you are invoking:
delegate int del(int i);
del myDelegate = x => x * x;
int j = myDelegate(5);
Is there a way in c# to encapsulate a meth...
Hi All,
A colleague of mine has a little problem with his dev env (Win 7 + VS 2010):
We have a class librairy project which reference .net 2.0, if we build it with "Debug" and open it with Reflector, we can see "Target Runtime : 2.0..." if we build it with "Release" configuration, we can see "Target Runtime : v4.0" (and if we use it i...
Hi,
does anyone know if there is a way to trigger the client side form validation in a .Net MVC app manually? I want to do the following:
<script type="text/javascript">
if([form valid]) {
//do something
}
</script>
I already looked through the code in MicrosoftMvcValidation.js but didn't find a method I could call on...
What sets the JSON buffer length other than web.config or creating an instance of the JavaScriptSerializer?
Is anyone aware if ASP.Net, the .Net Framework, IIS, IE force or impose a buffer lenght forced at 2 Megabytes or data?
So far maxJsonLength is the only property I control.
All works as expected bellow 2Megabytes, but above that...
Could someone clear something up for me? As far as my understanding goes, the physical model describes how the data is represented in the context of a specific storage medium. The logical model is a representation in terms of entities and relationships, independent of any particular data management technology. How do these two work with ...
Hi,
I'm getting the error "client found response content type of '' but expected 'text xml' The request failed with an empty response." when i try to execute the following code.
//create a PDF from the SQL report
ReportViewer rview = new ReportViewer();
rview.ServerReport.ReportServerUrl = new Uri("http://server/ReportServer$MSSQL2K5?...
This line of code confuses me:
List<string> keys = new List<string>();
IDictionaryEnumerator ca = cache.GetEnumerator();
while (ca.MoveNext())
{
keys.Add(ca.Key.ToString());
}
What is an Enumerator? Is it connected to Enumerations? I try to find a tutorial on enumerators, but without success. Hope someone will have patience to expla...
I have the following XElement
<Issue Type="Duplicate" Distance="1">
<Record>
<ID>6832</ID>
<Name_First>JAMES </Name_First>
<Name_Last>SMITH</Name_Last>
<Company>SMITH CO.</Company>
</Record>
<Record>
<ID>6831</ID>
<Name_First>JAMES</Name_First>
<Name_Last>SMITH</Name_Last>
<C...
I use SslStream with TcpClient in following way:
I call BeginRead() method and waiting for its results. When results come, I read them, call BeginRead() again and so on... Sometimes I need create another SslStream with this TcpClient, i.e. perform another ssl handshake.
How can I abort reading execution? It seams that if I try to cal...