Can we write an eventreceiver that gets fired when any list is updated.
The listtemplateid that we have to specify for an eventreceiver makes our code specefic to one breed of lists. What if we want to have the code execute for events on all lists of site?
...
If I have those two classes that have two different properties but with the same name:
[RdfSerializable]
public class Type1
{
[RdfProperty(true), Name = "title"]
public string Title { get; set; }
}
[RdfSerializable]
public class Type2
{
[RdfProperty(true), Name = "title"]
public string Title { get; set; }
}
and try to...
Hello,
In our .NET application we depend on binary serialization for our application project files. The main project class file uses the following method to serialize itself (note all exceptionhandling is removed for clarity).
public void ProjectSerialize(string filename)
{
Stream s = File.Open(filename, FileMode.Create);
...
Hi:
I have many asynchronous operations in different class.
When error,it will throw special exception which is inherited from System.Exception.
In some form,I wanna catch it by messageBox.
The function "Application.ThreadException" cannot catch it.
In other word,I cannot catch all the exceptions by the function when there is some ...
I've been tasked with creating some sort of service that will take any e-mail sent to an e-mail address and handle the contents of the e-mail (including binary attachments.)
I've got full access to the server (Windows Server 2008) that will run this service, and have decided to code the solution using the .NET framework (3.5).
Now I'm ...
I work on a project where there is a huge number of objects being instanced by a few classes that stay in memory for the lifetime of the application. There are a lot of memory leaks being caused with OutOfMemoryExceptions being thrown every now and again. It seems like after the instantiated objects ago out of scope, they are not being g...
I am struggling to choose what to use for authentication and authorization for my .Net application. I am using ASP.Net MVC with C#. In Java I find Spring Acegi Securiyy very easy and good to implement to secure urls, hide menus and button and even secure my methods.
Also I would be using windows Active directory to store user profile.
...
I need to create a custom attribute that is applicable only for non static class member.
How can I validate this constraint on project compilation or using code analysis tools?
...
I've recently started a new project, and we plan to create this in Silverlight. We do want to develop it as a RIA, and based on previous experience with other .Net technologies (such as WPF) Silverlight feels like the right choice.
Silverlight has been around for some years now, and as version 3 is out I assume - and got the impression...
Sometimes to make a variable/method/class name descriptive I need to make it longer. But I don't want to, I'd like to have short names that are easy to read. So I thought of a special addin to IDE like Visual Studio to be able to write short names for class, method, field but be able to attach long names. If you need to - you can make it...
I am trying to create a "Hello world" application in Silverlight 3.0, but when it runs, there is an error: (IE 8)
Error:
Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
When the project was created I chose t...
Hi,
Let me make a confession first , I am newbie to C# and .Net :)
I have a set of RichTextBoxs , content in the box can be applied different colors at substring level, like this ,
this.selectedField.richTextBox1.SelectionColor = Color.FromArgb(253, Color.Black);
when I try to read the Alpha value for that part of string , using (Col...
I am implementing an log-structured file system and want to encrypt a series of blocks by using the .NET Cryptography namespace. I've chosen the Aes symmetric encryption, created the key and the initial, random Initialization Vector.
So far so good, using the ICryptoTransform returned by SymmetricAlgorithm.CreateEncryptor() it is possib...
"User A" is logged on
My application recognizes Environment.Username as "User A"
Now in Windows, I click on Switch user ...
"User B" logs on
"User A's" processes are still running
Application run by "User A" still says Environment.Username is "User A"
I want the application to recognize that the currently logged on user (currently acti...
Hello everyone,
I am using VSTS2008 + C# to create a Silverlight application based on ASP.Net web application. I only add one line to the default page.xaml to host a local video,
Here is the content of XAML, and I want it to scale according to video width/height ratio related to the display area on web page, so I select Stretch="Unifor...
Hi,
I am trying to publish to a FTP site using VS2005.
This worked before and now having come back to it
some months later dos not work.
The error is
Error 3 Could not find required file 'setup.bin' in 'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bootstrapper\Engine'.
I also get this warning
Warning 2 Item 'Microsoft.Net.F...
Hi,
I am using C# .NET 2.0.I want to generate a PDF file . I should write a text in the file.
What are the prerequsites we need to generate the PDF.
Any simplae coding samples will help me.
PLease suggest opensource libraries.
Thanks in advance.
...
Hi,
I have a datagridview whose datasource is a datatable.
I am adding a checkbox column to this datagridview.
Two issues that I am stuck at:
1. When the user clicks on any of the cells in that column, I first need to get the state of the checkbox.
2. If the state is unchecked then a message box pop's up asking if the user wants to check...
We are looking forward for some good document management suits/applications, with some extensibility.
The customers will submit various documents, and this need to be stored using the system for later review and verification. Customers can come back any time to view/modify these documents.
We need to integrate this with the existing .N...
I am making a Silverlight UserControl where the consumer of the control needs to be able to provide custom attributes and content. I thought this would be as easy as exposing my custom attributes as dependency properties and deriving from ContentControl, but apparently not.
Here are my questions regarding this:
I got the attribute to...