.net

Xml in Dot net 3.5:how to load xml document into object of class generated from schema?

I have defined schema for xml in file "packetTemplate.xsd".Using ms tool "xsd.exe" i have generated class "PacketTemplate" corresponding to schema.Does dot net provides api that can load xml document by refering to file and returns object of class PacketTemplate. ...

Providing .Net Training to recruitment team

In our organization responsibility is given to me to teach .net to our recruitment team (non technical), i need to design the entire training session. They want a training so they can filter out some of the candidates at their level. Please give me suggestion that what i should teach them in my training ? ...

how to set current user name in SharePoint?

Hello everyone, I am using SharePiont Server 2007 Enterprise with Windows Server 2008 Enterprise. I am developing using VSTS 2008 + C# + .Net 3.5. I am wondering whether SharePoint has any means to set current user to be some specific user? For example, I want to set the user to be administrator automatically when people connects from a...

How to set the sheet name for a C# generated Excel spreadsheet?

We generate an Excel spreadsheet in our C# .net website by writing out an HTML table to Response. This works great, but the sheet name gets set to the same as the file name. Is there away to set this? We require a certain sheet name when importing. Code: string filename = String.Format( "{0}-CopyDataBack_{1}.xls", Master.EventID.ToStr...

Disable CodeRush

I don't want to uninstall code rush. I just want to have the chance ti turn it off when I dont want it. Is this possible? (express version)... ...

How to get information form page in Custom XMLSiteMapProvider

Hey there guys! First of all I need to tell you that I use URL Rewriting on this project. For the article page this is the url : www.mysite.com/section1/section2/month/day/year/modifiedArticleName For breadcrumbs I use SiteMapPath control with a custom XMLSiteMapProvider because I can't keep all my articles in the xml file. In this p...

RIA services, EF and stored procs

I have this problem for 2 months now How can I use stored procedures whith RIA. I was using LinqToSql and everithing works fine. I've made an class in designer and mapped it to a SP. Now in EF I saw this ComplexTypes I've imported son SP with result in ComplexTypes. But in DomainDataSource are not appear. OK. But how can I use the...

Should a class have the same name as the namespace?

I'm designing a namespace to hold a set of classes that will handle user related tasks for a several different applications. (Log-in, authenticate etc) The problem is the namespace will be called Fusion.User but then it requires a class in that namespace that makes sense to call User. Should you have a class with the same name as the n...

master page error

Hi I have created a master page and attached other pages to, and it looks fine. But when i run it it give me the following error message- *Parse Error Message: The file'/projectname/MasterPage.vb' does not exist* I dont know why becuase the master page is there. and it continues to the next line and says- Line1 <% Master Language="V...

NET 2.0: Can I set settings filename?

Hi to all, I have a Windows (not Web) NET 1.1 app which can accept the settings file as its argument; this way I can easily switch between (e.g.) different connection strings just by passing a different settings file. I understand that in NET 2.0 settings manager has been made simpler: we can define it at design-time and easily access i...

how to add C# code in default.aspx in SharePoint

Hello everyone, I am using SharePiont Server 2007 Enterprise with Windows Server 2008 Enterprise. I am developing using VSTS 2008 + C# + .Net 3.5. I want to add some C# code to default.aspx (more details, adding some logics to Page_Load method of default.aspx) and its code behind file. But I did not find default.aspx and its code behind...

Page_Validators is not defined problem

Hi i am using asp.net routing when using ValidatorEnable function in javascript i got this error 'Page_Validators is not defined' how to solve this? i am using this code in my global.asax file routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{*allaspx}", new { allaspx = @".*\.aspx(/.*)?" }); ...

WPF: TemplateBinding to StrokeThickness of Shape does not work?

Looks like the following Ellipse in ControlTemplate does not get the BorderThickness, but why? <Window.Resources> <ControlTemplate x:Key="EllipseControlTemplate" TargetType="{x:Type TextBox}"> <Grid> <Ellipse Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHe...

What is the most convenient way of handling nested config data in .Net?

I often store application config data in an app.config file in the following format: <configuration> <appSettings> <add key="foo" value="foo value"/> <add key="bar" value="bar value"/> </appSettings> </configuration> This can then be easily accessed at runtime with: string fooValue = ConfigurationManager.AppS...

Problem interfacing C++ POS controls with the .NET POS SDK

We're trying implement a .NET Service Object that supports a COM interface to emulate a POSPrinter but still be compatible with the older technologies. We have our interface and class object in the following class.. using [...] namespace yRPOSPrinterDotNet { [Guid("2D570F11-4BD8-40e7-BF14-38772063AAF0")] [InterfaceType(ComIn...

What are solid NMaven or build servers for .NET alternatives?

Maven had a long history and is well supported in the Java world. NMaven has received a less successful start and has never become as popular in the C#/.NET world as its larger cousin was in the Java world. The project seems close to dead(ish), but maybe I'm wrong. Are there alternatives that, preferably using NAnt, are commonly used in...

NHibernate Fluent and named Queries

hi, I have the following named Queryé, whose result I like to get mapped on a class. <sql-query name="GetIndustryCodes"> <return class="IndustryCode"> <return-property name="Sector_kategorie" column="Sector_kategorie"/> <return-property name="Sector_scheme_reference" column="Sector_scheme_reference"/> <return-prop...

Grouped Gridview

I am in the process of transitioning an Access DB to a Web application. The Access DB currently produces reports using grouping e.g.: Country ------------------------------------------------------- County ------------------------------------------------------- City Name | Population | Post Code | I'm trying to reproduce this using asp...

Issue with C#/.NET BinaryReader.ReadChars()

Hi all, I've run into what I believe is an issue with the BinaryReader.ReadChars() method. When I wrap a BinaryReader around a raw socket NetworkStream occasionally I get a stream corruption where the stream being read gets out of sync. The stream in question contains messages in a binary serialisation protocol. I've tracked this dow...

web service or .net library for moon and sun set/rise times?

Anyone know of a web service or .NET class library that can provide rise/set times for the sun and moon for any given date and any given latitude/longitude? Thanks in advance. ...