.net

advantages of WPFbrowser application over asp.net and viceversa for web development

I'm not familiar with WPF but I've seen things I like about it for web development. I wonder which advantages has developing a WPFbrowser application over asp.net (webforms/MVC) and viceversa. are there things you can do or use in asp.net you can't do in a WPFbroser application? ...

How to include two namespaces with same name in a ?

Hi, I have two namespaces with same name. Can I refer both in same file? ...

.NET Framework deprecated interfaces and attributes. What was your biggest refactoring due to lack of support?

Some .net-framework interfaces and attributes become obsolete and deprecated since new framework version appears. I am warned that such code may be removed or become unpredictable in next versions but have you ever faced the situation when you were forced to refactor code because code came uncompilable or start to behave weird? What was ...

Entity Framework 4 - Handling very large (1000+ tables) data models?

We've got a database with over 1000+ tables and would like to consider using EF4 for our data access layer, but I'm concerned about the practical realities of using it for such a large data model. I've seen this question and read about the suggested solutions here and here. These may work, but appear to refer to the first version of th...

How to start up your .NET program from web browser?

Could you provide example of JavaScript function for starting up application installed on your computer from a web browser (eg google chrome 4). It particular if .Net APPs have any special simplifying this process apis of out there are some libs for such staff, please share link with us. so how to create and store in run on start up p...

DataGridView and Binding List Event.

I have a datagridview with a datasource of type binding list. I understand that when the datagridview changed this will update the items in the binding list. I also know that if the objects in the bindinglist implement Inotifypropertychanged then if the obects are changed outside the grid then the objects will notify the bindlist which...

Memory allocation error from MySql ODBC 5.1 driver in C# application on insert statement

I have a .NET Wndows application in C#. It's a simple Windows application that is using the MySql 5.1 database community edition. I've downloaded the MySql ODBC driver and have created a dsn to my database on my local machine. On my application, I can perform get type queries without problems, but when I execute a given insert statement ...

.NET WPF Application : Loading a resourced .XPS document

I'm trying to load a .xps document into a DocumentViewer object in my WPF application. Everything works fine, except when I try loading a resourced .xps document. I am able to load the .xps document fine when using an absolute path, but when I try loading a resourced document it throws a "DirectoryNotFoundException" Here's an example ...

Window manipulation and inctences control

In my application there are only 2 windows — win_a & win_b, on each of these windows there is button that call another window, e.g. click on btn1 of win_a will call win_b, click on btn2 of win_b will show win_a. Desired behaviour: 1. Only one instance of object is premitted at the same time, e.g. situation, where 2 instances of win_a ru...

whats are the major disadvantages of using Membership API?

Whats are the major disadvantages of using Membership API? And when should i consider relying on using manual coding? ...

Can JAX-WS host "web" service in desktop program?

Can Java (JAX-WS) host "web" service in desktop program? For example .net wcf can host services anywhere. Tnx all. ...

Winforms WebBrowser tell when done Refreshing

I have a page that refreshes every 20 seconds and I need to know when it is done refreshing, the DocumentCompleted event does not fire when you refresh for some reason. Any ideas? ...

.net 2.0 assembly security

Hi, I have an assembly and want to restrict the assemblies and applications that can call/use this assemblies functionality. Can anyone provide detailed information on how this can be achieved ? From what I have read on the internet this is not possible because any "fully trusted" assembly will automatically be granted access. I am u...

How Can I Get a TextPointer from a mouse click in a FlowDocument

I would like to get the word that a user has clicked on in a FlowDocument. I am currently adding an event handler to every Run in the document and iterating through the TextPointers in the Run that was clicked, calling GetCharacterRect() on each one and checking if the rectangle contains the point. However, when the click occurs near t...

Unable to return large result set ORA-22814

Hello All I am encountering an issue when I am trying to load a large result set using a range query in Oracle 10g. When I try a smaller range (1 to 100), it works but when I try a larger range(1 and 1000), I get the following error "ORA-22814: attribute or element value is larger than specified in type" error. I have a basic UDT (Po...

Function for flipping the sign of a number

How can I change the sign of a number? abs(); will not return me a negative when the input is positive, correct? I need the opposite sign. ...

problem with HttpWebRequest.GetResponse perfomance in multithread applcation

I have very bad perfomance of HttpWebRequest.GetResponse method when it is called from different thread for different URLs. For example if we have one thread and execute url1 it requires 3sec. If we ececute url1 and url2 in parallet it requires 10sec, first request ended after 8sec and second after 10sec. If we exutet 10 URLs url1, url2...

Using generic type from other generic parameter

Hi, I have a question about .net generics. Consider the following code: public abstract class Test<TKey> { TKey Key { get; set; } } public class Wrapper<TValue, TKey> where TValue : Test<TKey> { public TValue Value { get; set; } } Now, when using this code, I could do something like this: Wrapper<Test<int>, int> wrapper...

XName x = "string" ??

I forgot casting mechanism when i encounter it :) . So can u make me remember it again ? Because it looks not acceptable for me at the moment. ...

TreeView update bug in the .net framework

Consider the following code: Dim Working As Boolean = False Private Sub TreeView1_AfterCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterCheck If Working Then Exit Sub Working = True e.Node.Checked = Not e.Node.Checked Working = False End Sub Private Sub TreeView1_Mo...