Quantcast
Channel: Visual C# forum
Browsing all 31927 articles
Browse latest View live

asp.net:PermissionSet.Demand does not throw SecurityException in medium trust

Hi,I use following code to check whether my assembly is in medium trust or full trust,try{    new PermissionSet(PermissionState.Unrestricted).Demand();}catch(SecurityException){}I also implement a...

View Article


Safest and most secure way to store information in a WPF application

Hi everyone,I would like to know the safest way to store information in WPF application. The information varies from passwords to other system informations.On my research, I found two ways to do...

View Article


Best way to add objects to Active Directory with C#

Hey,I am wondering what would be the best and easiest way to populate an active directory with this given:I have an IEnumerable list of user objects with these properties: (all of them are strings)...

View Article

windows click ones application slow in production server

Hi Team,My application is click once windows application. App works usual in dev, testing & PPE. But in production, application runs very slow. Even tabing, loading of context.. everything very...

View Article

ASP.NET MVC EF Code First set LastUpdateTime automatically

  In a model class, there is a field  public DateTime  LastUpdateTime { get; set; }  It is supposed to be set to the value of GetDate() every time the record is updated, how to do?

View Article


The type of the value being assigned to variable differs from the current...

I'm trying to execute:            var DrgFileDir = Directory.GetFiles(@"C:\Source", "Drg*.txt");            if (DrgFileDir != null)            {                Dts.Variables["DrgFileName"].Value =...

View Article

Settings.settings for Debug and Release

How to put two different sql connection strings in Settings.settings for Debug and Release.e.g.DebugMyConnStr - Data Source=192.168.0.1;Initial Catalog=xxxxx;ReleaseMyConnStr - Data...

View Article

Populate combo list from database using enterprise library 3.5 in c# coding

Hi,m using enterprise library 3.5 with C# and i want to generate the combo box list items from database when the form is loaded ...Please help.

View Article


Group By in LINQ

How would I write this in LINQ...Below --> Positions is a datatable and I want the output to be a datatable as well. Thanks.-------------------------------------------------SELECT Fund, Ticker,...

View Article


How to create and pass a lazy for unit testing?

Hello all,So i decided to create a repository for my MEF project, this would allow me to swap out the source for my given situation (runtime, testing, etc...) However, I've noticed and I understand...

View Article

I need some class for math graphs

I need some class or example on how to create Windows Forms application with graph that will have a coordinate system (with both x and y lines). Application must work with limes functions.Any help on...

View Article

PowerShell and Visual Studio - x32/x64 Remote

Hi folks,i am trying to do a remote powershell from c# code. The code is running in x32-mode but the target powershell is running in x64. afaik this is not possible.is there any solution to do this?mfg...

View Article

How to compare a value of a data table with -1

Hi i have a data table where i am comparing its values with 0 and i want to add one more condition to compare with -1. My code is somthing like...

View Article


Parsing numbers from address

A few months back I created several SQL CLR C# functions for a data cleaning project that I was working on. I've had to revisit the code due to a number of bugs that have been found recently.One of the...

View Article

Problem in calling procedure using named query in NHibernate.

Hi, I am facing some problem while calling procedure using named query in nhibernate. I can easily call simple procedure / parametrized procedure but I have procedure which accept three argument, one...

View Article


Insert com TableAdapter grava espaços

Bom dia a todos,Estou usando TableAdapter para fazer insert no meu BD e ele está completando com espaços todos os campos varchar até o limite do campo.O comando que utilizo é o seguinte (tbNome é um...

View Article

SubMenu item Event Handler in C#

Hi,i had a menu under which several sub menu items are there, i need to assign the click event for the submenu item.Thank you in Advance.- David

View Article


Visual/Graphical representation of how a Program compiles and works

I am trying to get a better understanding of how a program actually works during compile and building for the development side.  I was recently asked the question, but was not able to answer it past...

View Article

How to use HTML Controls in code behind?

is it possible to access html contros in to code behind?Thanks and RegardsSwaminathan S

View Article

404 Not Found The requested document was not found on this server on...

When i am inserting  data in product information  from that link http://www.surplusbazar.com/Product.aspx and click on Submit Button Its Show an Error 404 Not Found The requested document was not found...

View Article
Browsing all 31927 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>