For example I have class to serialize
[Serializable]
class Person
{
[XmlAttribute("name")]
string Name {get;set;}
}
I need to make Name attribute required. How to do this in .NET?
I'm looking for a while to programmatically convert (or use a tool already created) MACESS .cra, .acr, and .err files to a readable format?
I'd prefer a .NET way of doing it however at this point I'll take any programmatic way.
PS I tried adding tags "MACESS Sungard" but I don't have 250 rep yet to do so.
The .Net 4 32 + 64 bit Full is 48.1 MB and the Client Profile is 41.0 MB.
Why I will prefer install the Client Profile instead of the "Full Framework"? What difference there is in that packages?
I have an asp.net app that uses System.IO.Path.GetTempFileName() for temporary files. In the production IIS environment (W2K3), the temp folder (System.IO.Path.GetTempPath()) points to C:\Windows\Temp. But on my XP dev machine it's C:\documents and settings\machinename\ASPNET\temp.
Is it possible to change this folder without affecting other accounts on my machine?
i have a piece of code here that breaks if the directory doesn't exist
System.IO.File.WriteAllText(filePath, content);
is it possible to do in one line (or a few lines) to check the directory leading to the new file doesn't exist and if not, to create it before creating the new file.
i'm in .NET 3.5 here.
I've got a series of Excel spreadsheets, each with at least one page of data and one page of a chart created from the data. I need to capture ( not regenerate from the data ) the existing chart as a web friendly image. Is this possible via Java or .Net? I know the POI stuff (Java) won't do it (or so I'm told, haven't tried it myself).
I'm looking for an object database for .NET that is open source and free for commercial use. I need something that is available as assemblies and/or source code to embed into a project, i.e. not a stand alone database in its own process.
I am aware of db4o, and it would be perfect except for the commercial license coming at a price.
I used Server side code for HIDE a DIV. but when i click button tool for another event but DIV is always open. I use ASP.net c# code.
how i solve this problem
thanks
How I have make project which have master and childs record it also have filterion criteria now I want to validate the delation of these child record base on master record How I can do it in asp.net
I have checked the following article on how to use the sqlMembershipProvider. My doubt, is this the way most of the asp.net applications authentication schemes implemented.
Is there any other method, any references will be quite helpful for me.
I want to write a basic if statement on my site to display either item 1 or item 2 depending on if a variable is set to true.
I am not to familiar with .Net and need a little help with the basic structure of how to get an if statement to work on the aspx page.
thank you for your help.
Hello,
I have developed my .net web app on XP using IIS6.
It uses just plain old master pages, nothing fancy. No nested master page.
When I deployed it to the server, which is IIS7, suddenly any page that implements a master page, will not be rendered.
Gives a 404 error instead.
Any ideas, about confguration that I need to specify in IIS7 that is not in IIS6?
Thanks
I have constants in my cs file Constants.cs. In the asp.net mvc controllers I use the constants like this ViewData[Constants.Whatever] = ...;
How can I use the constants in my aspx file? When I try to use it I get an error saying:
CS0103: The name 'Constants' does not exist in the current context
I've inherited a bunch of code that has server script inside of .htm files.
On IIS, a handler mapping pumps.Htm pages though the asp.net engine.
Unfortunately, visual studio doesn't notice that they should be treated as code.
Is there any way to make VS treat .Htm files as code/aspx files?
Hey
I am getting the following error
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
but all I am trying to do is inside a ASP.NET REPEATER Control
<% if ( Eval("Message").ToString() == HttpContext.Current.Profile.UserName) %>
<% { %>
<asp:ImageButton runat="server" etc.... />
<% } %>
I have found few links but could not decide which one is the best way.
http://fabiomaulo.blogspot.com/2009/06/localized-property-with-nhibernate.html
(This stores all localised language data in one field. Can be a problem if we query from Sql)
http://ayende.com/Blog/archive/2006/12/26/LocalizingNHibernateContextualParameters.aspx
(This one has a warning at the beginning that it is a hack and no longer supported)
http://www.webdevbros.net/2009/06/24/create-a-multi-languaged-domain-model-with-nhibernate-and-c/
(This does not describe how multilingual data will be structured in the database.)
Hi,
I have created one application in c#.net.Using this application we can update datagridview,now i need to implement undo in it plz give me some ideas.
private void button29_Click(object sender, EventArgs e)
{
Datatable dt;
dt.RejectChanges();
}
using above code i can do undo before updating.
but i need a undo feature as in word plz suggest me
thanks in advance
I am creating a kiosk application and I want to ensure it is always, no matter what, on top of other Windows applications and the Windows task bar.
I am already blocking Windows keyboard commands (alt-tab, etc) but there are still situations that could cause an application to launch and steal the screen.
Is it possible to hook into Windows from .NET and continually test whether the application has focus and is on top, and if not then give it focus and make it on top?
I am looking for a way to insert javascript code block to end of ASP.NET page.
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "videoyuGoster", sScript, true);
is appending to body but js codes are always requesting some js files didn't load or some functions are below of the script.
How can i append scripts that i generated dynamically to the bottom of body?
Thanks for your help.
Hello,
I changed some names of nameapces, assemblies in one of exsisting project(C# and ASP.NET). But when I try to debug it; I get this error.
Could not load file or assembly 'HR' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).
I have replced DFI with HR in the code.
Please help,
Thank you
I want to allow the user to add columns to a table in the UI.
The UI: Columns Name:__ Columns Type: Number/String/Date
My Question is how to build the SQL tables and C# objects so the implementation will be efficient and scalable.
My thought is to build two SQL tables:
TBL 1 - ColumnsDefinition:
ColId, ColName, ColType[Text]
TBL 2 - ColumnsValues:
RowId, ColId, Value [Text]
I want the solution to be efficient in DB space,
and I want to allow the user to sort the dynamic columns.
I work on .NET 3.5 MSSQL 2008.
Thanks.
I am building a desktop application that needs to update current user's status frequently. This status will be available as RSS feed.
In order to do this, I think I can create a asp.net folder and secure it using form authentication. When the desktop application written as winform in c# needs to update status, it can set WebRequest.Credentials and upload data.
Is there any better way of doing this?
Thanks
I have a Asp.net web application running with the following config setting.
<xhtmlConformance mode="Legacy"/>
This limits use of AJAX and compatibility with multiple browser.
If my understanding is correct, the HTML code of the aspx pages need to be fixed to comply with XHTML 1.0 Strict.
There are alot of HTML pages, ~1000, is there a tool that could speed up this process?