.net

Webclient using download file to grab file from server - handling exceptions

Hello everyone, I have a web service in which I am manipulating POST and GET methods to facilitate upload / download functionality for some files in a client/server style architecture. Basically the user is able to click a button to download a specific file, make some changes in the app, then click upload button to send it back. Proble...

Why do .NET winforms scale improperly at large DPI settings?

My .NET application (VB.NET 3.5 if you really must know) forms do not properly format when rendered at high DPI settings. All of the fixes I've found so far simply explain the cause of the problem as "certain UI elements do not scale properly". I was wondering if anyone had a more meaningful explanation? Thanks! ...

How to store the file in the database ?

How to store the file which is uploaded by the user to the database ? I want to store the file in the database how can we do that ? In the back-end I am using sql with c#.net application. ...

.NET remoting exception: Exception in the Socket#33711845::DoBind - Only one usage of each socket address (protocol/network address/port) is normally permitted

Hi All, I'm attempting to setup a simple remoting windows service and getting the following error when starting the service: "System.Net.Sockets Error: 0 : [4180] Exception in the Socket#33711845::DoBind - Only one usage of each socket address (protocol/network address/port) is normally permitted System.Net.Sockets Verbose: 0 : [4180] ...

.NET Comet engine

is there a .net based comet engine? like Ajax Push Engine that is free and open source? ...

global variables in c#.net

how can i set a global variable in a c# web application? what i want to do, is to set a variable on a page (master page maybe) and access this variable from any page. i neither want to use cache nor sessions. i think i have to use global.asax... any help? ...

Why should the "prime-based" hashcode implmentation be used instead of the "naive" one?

I have seen that a prime number implmentation of the GetHashCode function is being recommend, for example here. However using the following code (in VB, sorry), it seems as if that implementation gives the same hash density as a "naive" xor implementation. If the density is the same, I would suppose there is the same probability of cllis...

How to pass value from wpf form to wpf user control

Hai am having a WPF user control in my WPF Form, when i click my button in my form , i just want to pass some value to the textbox which is in the usercontrol, tell me how to do this. ...

call function in controller from view

i wrote a simple function in controller public string LinkProjectSquareFilter(int squareId) { return squareId.ToString(); } how can i call it from view? it say The name 'LinkProjectSquareFilter' does not exist in the current context ...

int.ToString like HH formatted of DateTime

("dd/MM/yyyy HH")+ " - " + (x.Hour+1).ToString(); So here is example what I got and what I need : 0 ---> 00 3 ---> 03 12 ---> 12 How can I use ToString for it ? I've tried : x.ToString("dd/MM/yyyy HH") + " - " + x.AddHours(1).ToString("HH"); doesn't works ... ...

Retrieving OS name

Is there any way to get the OS name the user is currently using? ...

.NET coded event handling vs event handling in IDE (RAD) ?

Which method is better and why, when? In terms of scalability,performance etc which one is better? From my point of view coding by hand is better and more natural. what do you guys think? ...

Help needed inorder to avoid recursion

Hello All I have a method, which gives me the required number of Boxes based on number of devices it can hold.Currently i have implemented this logic using recursion private uint PerformRecursiveDivision(uint m_oTotalDevices,uint m_oDevicesPerBox, ref uint BoxesRequired) { if (m_oTotalDevices< m_oDevicesPerBox) ...

send credentials to WebBrowser

Hi, I have a webbrowser control that navigates to sharepoint port. How can i send credentials to webbrowser control, so i can navigate to the site with custom credentials? ...

Date Insert in SQL CE with internationalization

Before changing the regional settings of my computer. i can save a data in my application using SQL CE. when i changed my regional settings, for internationalization purpose, i can't save anymore and no error thrown when inserting data through my application. One of the fields there is a DateTime. What might be the problem? ...

.NET Compact COM interoperability

I have the following code in a full .NET framework solution: public delegate int CreateObjectDelegate( [In] ref Guid classID, [In] ref Guid interfaceID, [MarshalAs(UnmanagedType.Interface)] out object outObject); ... var createObject = (NativeMethods.CreateObjectDelegate) Marshal.GetDelegateFo...

How to create a dependency property of type Type, and assign it in the XAML ?

I'd like to know how I can assign in XAML a dependency property of type Type in Silverlight since the markup extension {x:Type} does not exist ? Thanks, ...

How to design the application to conform to the n-tier architecture? (Winform sample in .net with linq?)

Rather a simple question. But the implications are vast. Over the last few weeks I've been reading a lot of material about n-tier architecture and it's implementation in the .NET world. The problem is I couldn't find a relevant sample for Winforms with Linq (linq is the way to go for BLL right?). How did you guys manage to grasp the n-...

How find a SubForm of a application with changing texts?

Hi, I have Application X with Subform x1, x2, x3. The Subform has, because its multi-language, not a static text in it, neither a specific window header text or something. What can I do to find this window in my code an react when its open, e.g. with a messagebox? ...

Is the word "Helper" in a class name a code smell?

We seems to be abstracting a lot of logic way from web pages and creating "helper" classes. Sadly, these classes are all sounding the same, e.g ADHelper, (Active Directory) AuthenicationHelper, SharePointHelper Do other people have a large number of classes with this naming convention? ...