Evan Mulawski's Q&A profile
Internet Explorer Development IE7 displays my xml/xslt page differently from IE6
Hi, I have a Web application that works as follows: - An ASP.net page generates an XML string linked to an XSLT stylesheet and sends it to Internet Explorer. - Internet Explorer applies the stylesheet and displays the resulting HTML page in the browser. Everything worked great with IE6 and most of this still works fine in IE7 except for one page. In that page, I return an XML string similar to the following: 1 < xml version="1.0" encoding="utf-8" > 2 < xml-stylesheet type="text/xsl" href="styles/volumetryAdmin.xslt" > 3 <ifinance xmlns="urn:ifinance" auth="0" lang="fr" today="20061109"> 4 <precomps> 5 <precomp id="5& ...Show All
Visual Studio Express Editions How do I make a custom Control?
Okay, hopefully I'm phrasing this question correctly. I'm writing a sort of black jack game. I have, in my project, a card class. One of the properties of the object contains the image of the card, which I can use to pass the image to a picture box on a form. This works okay. But what I want to do is actually place the card object itself on the form. How do i create a class from which I can instantiate an object that has a visual element that I can actually drop on a windows form, and possibly add events and so forth... ala a custom control If someone could maybe point me to the correct article. I've been searching, but i don't think I'm phrasing my question correctly. Thank you and best regards P ...Show All
Windows Forms update datagridview to datatable
my solution is a winform app that has 3 layers : UI,Bl and DAL. So yn my UI layer i have a winform with a datagridview inside which is feed with a dataview from a datatable and i have a combobox in the same form to filter the datatable , create a dataview and feed the datagridview. The thing is that the user can enter data in the datagridview, which means this data must be updated to datable in order to keep the data, because the user can shot a selectedindexchagend in the combobox so this fire a rowfilter in the dataview and the data shown in the datagridviws changes, so what i want is to keep the data the user enter in the datatable before update the database. but remember i am working in layers, not using datadapters. hope i m cle ...Show All
SQL Server too many cursors
hi am in situation where i have to place a cursor inside another cursor and within the inner cursor i have to insert record into temp table will this degrade the performance of my sp If so, what should i do thanku Well, if you are actually in the situation where you have to do it, then performance comes second. However, it is very rare to need a cursor, much less a cursor inside in a another cursor. Please post your need and we can help you find a non-cursor solution ...Show All
Visual Basic Is there a way to change the folder name for project settings?
Is there a way to change the folder name for the project settings i.e. “My Project” to “MyProject”. The place wher files like AssemblyInfo.vb and others are stored. Our source control implementation does not allow spaces in directory names and this I giving me grief in the VS IDE. One thing missing is that when you click on “Assembly Information” it does not know that the file moved and displays blanks. I know we can edit the files directly but this whole workaround becomes a training issue to users in our environment. IT would be nice to make this configurable in the next release or a service pack if possible J ...Show All
.NET Development Binary serialization stream/buffering issue.
Hi there. Take a look at the following bit of code. It's fairly simple. String Message = "Test" ; MemoryStream MemStream; Byte [] Buf; MemStream = new MemoryStream (); new BinaryFormatter ().Serialize(MemStream, Message); Buf = new Byte [MemStream.Length]; MemStream.Read(Buf, 0, ( Int32 )MemStream.Length); MemStream.Close(); Can anyone tell me why "Buf" only contains zeroes after this process is complete It should be filled with the serialized object data, not nulls. --JT http://zhaymusic.com/ Lucian Bargaoanu wrote: After Serialize you are at the end of the Stream, so actually you're not reading anything. Try MemStream.P ...Show All
Visual C# Substract 2 Dates, DateTimePicker, DateTime, TimeSpan
hi, how can i substract 2 dates from 2 dateTimePicker's, i tried all these methods like TimeSpan, DateTime, Substract, but it doesent work. Here's how i tried to do it : dateTimePicker5.CustomFormat = "yyyy,MM,dd"; dateTimePicker6.CustomFormat = "yyyy,MM,dd"; DateTime d1 = new DateTime(long.Parse(dateTimePicker5.Text)); DateTime d2 = new DateTime(long.Parse(dateTimePicker5.Text)); TimeSpan d = d1.Subtract(d2); i know problem is in LONG type but i don't know what to do now..... and one more question, the result from this ( number of days ) i have to send to textBox, but when i tried this code without dateTimePicker it worked, but besides number of days, i got time too time, (like d = 30 , 00 ...Show All
SQL Server Changing the DataSource at Runtime
I have to create a script for changing the datasource at runtime. Here is my screnario, While development I am using Data source name called "DevDatasource1" and when I am deploying it to other evnironment the datasource name will change let us say "QADatasource". I have to create a script for changing the datasource(i.e. DevDatasource1 to QADatasource). How I can achieve I this using the setItemdatasource You can also set a parameter in your report to accept the specific database or source and use this parameter within your datasource connection string. Within your report: My connection string looks like this: ="Data Source=nt33;Initial Catalog=" & Parameters ...Show All
Windows Live Developer Forums ASP.NET Virtual Earth Mapping Control
Here's a link to an ASP.NET Virtual Earth Mapping Control that I'm developing. http://pietschsoft.com/product/ve3 The goal of Atlas is to bring a familiar experience to JavaScript development for ASP.NET developers. They have an abstraction layer built that makes JavaScript programming similar to C#. It is actually rather awesome. With my project, the goal is to create an abstraction layer (the PietschSoft.VE3 library) that eliminates the need for an ASP.NET developer to write JavaScript when utilizing MS Virtual Earth v3. As you can see, the goals are similar. The big difference is that my project is specialized for just MS Virtual Earth mapping. And, the reasons I am not using Atlas within my control are: 1) It's in Beta a ...Show All
Windows Forms Test for Existance of Object
Using C#, VS 2005, Windows app - on the main menu we have a menu item to open a mileage screen. If the user clicks on the "Mileage" option on the menu, the screen opens as per the code below. However, if they minimize the screen, or lose track of it below another screen and click again on the mileage option, it will open a second mileage screen. How can I test for the existance of the mileage object, and if it exists, simply bring the screen to the top private void mnuMileage_Click(object sender, System.EventArgs e) { Mileage mileage = new Mileage(); mileage.Show(); } Many thanks Mike Thomas you could just do ShowDialog(), instead of Show(), which prevents the user from going back to the othe ...Show All
Software Development for Windows Vista RPC problem with MSDTC
Hi everyone, I am having some trouble with the DTC on a client machine and need help to get it working. The problem started while doing some experimenting with the new WCF stuff, but has evolved into a simple client side dtc problem. In a nutshell, I can't get dtctester utility to work. Some interesting points: * I am running winxp sp2 on both client and server * server is running SqlServer 2000 * both computers are in same domain * several other computers in the same domain can run both my wcf transaction code and the dtctester util without problem * my local firewall is turned off * server firewall is turned off * security config for dtc on both machines set to allow everything (all check boxes are checked) with No Authentication Requir ...Show All
Visual Studio 2008 (Pre-release) Vista User Experience Guidelines
I'm trying to follow the vista user experience guidelines for my wizard (developed in wpf). However, I don't think the font theme information is correct...or Vista didn't bother to follow the same font theme information For example: Second Instructions Font Theme: Suggests a 9 point font. But if you look at the 'Personalize appearance and sound effects' in Vista thier secondary instructions such as 'Display Settings' look bigger than a 9 point font. Here is where I'm getting the font theme: http://msdn.microsoft.com/library/default.asp url=/library/en-us/UxGuide/UXGuide/Visuals/AeroTheme/AeroTheme.asp Here is the way I interpert that style: < Style x:Key = " WizardSecondaryInstruction " TargetType = &quo ...Show All
Visual Studio Tools for Office Synchronize between Word and SQL Server trough content controls
I want to create a Word addin that allows our client to create documents such as invoices and contracts in Word 2007. There are three important constraints...... The documents must be centrally stored within a database. The documents must be based on a templated that is generated on information in the same database. It must be possible to (on-the-fly) add 'free text' content controls that are also stored in the database.... For example.... We have three database tables....a document table, a content table and a documentContent table that describes the structure of the document.. <document Order> <contentControl OrderHeader> </contentControl> <contentControl OrderDetails> ...Show All
Visual Studio Team System Merged Changesets List
(#Reporting forum asked me to start a thread about this topic in this forum. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=767423&SiteID=1 ) Hi All, I am trying to get a report that would tell me what changesets that were merged. For example, I merge 10 changesets from my Dev line to my Test line and then commit the merge by checking it it. This would create 1 changeset coz of the checkin and the merge operation is complete. Now, can I generate a report that tells me what 10 changesets went in to the Test line. Any suggestions If you are willing to install the SP1 beta, there's a new API function called QueryMergesWithDetails that returns individual files instead of changesets. That removes mo ...Show All
SQL Server store data into temp array
How can you loop over a data reader and save the current row to a temp array of some sort and return this array back to the caller SqlDecimal total = 0; SqlConnection conn = new SqlConnection("Context Connection=true"); SqlCommand cmd = new SqlCommand(@"SELECT column1, column2, column3 FROM table ", conn); conn.Open(); SqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { if (rdr.GetSqlString(1) == "01") { // ADD the current record to a temp list total = total + rdr.GetSqlDecimal(2); } } SqlContext.Pipe.Send(total.ToString()); // RETURN the temp list rdr.Close(); conn.Close(); Hi, I agree with Isaac, it looks you may do it with CLR table-valued function. Answ ...Show All
