themadprof's Q&A profile
Visual C# How to handle HTML tag info in control?
I tried to use Server.HtmlEncode to solve this problem, but to find it still doesn't work. temp=Server.HtmlEncode(content.Text); Some people rendered HTML tag to attack website, some others did this for normal purpose. For those different clients, how to solve this problem Did i make it clear Thank you for your help in advance! ...Show All
Visual C++ How do I color a cell in a DataGrid depending upon its value?
I would like to colour a cell in a datagrid depending on a certain criteria. I've seen an example by Microsoft: [http://www.windowsforms.net/FAQs/default.aspx PageID=3&CategoryID=3&SubcategoryID=4&tabindex=3] section: “ How do I color a cell in a DataGrid depending upon its value or some external method “ ) third one down although it is in C Sharp and I would like to do it in C++. I have written part of it [see below]: using namespace System; using namespace System::Data; using namespace System::Windows::Forms; using namespace System::Drawing; using namespace System::ComponentModel; namespace testProgram { public __gc class colourRows : public System::Windows::Forms::DataGr ...Show All
.NET Development how web client download a pdf file from my window/Ldap server
Hi! I really don't know if this is the right place to post this question. . I have some confidential pdf statements (such as monthly statements from bank) on my window server (could on Novell directory also) and I will provide a download link in the web applicaiton for the web user so they can download or open the pdf file based on their login credential. the web client can not access those physical pdf files and only can download those files for themselves. I don't know how to implement this. Any idea or help will be appreciated. You should post this question in http://forums.asp.net/ , which focuses on web app development. ...Show All
.NET Development C# Asynchronous Socket. How to reject unwanted connection?
Hi all, I am a newbie on C# socket programming. Can anyone teach me how to reject an unwanted connection based on the IP This is my code (it does capture that the IP is not the wanted IP, but then after rejecting this, the main socket won't listen anymore): Socket tempSocket = m_mainSocket.EndAccept(asyn); string cIP = ((IPEndPoint)tempSocket.RemoteEndPoint).Address.ToString(); // I want it to only accept connection from 202.103.212.32 if (cIP != "202.103.212.32") { tempSocket.Close(); Console.WriteLine("Rejected connection from " + cIP); m_mainSocket.BeginAccept(new AsyncCallback ( OnClientConnect ),null); } else { m_workerSocket[m_clientCount] = tempSocket; tempSocket.Close(); } Please help, as I've been ...Show All
Visual Studio Express Editions Save collection into a file, then read back
Hi folks, I have been doing some searching here about how to store the data in a collection into a file, to be able to read it back in later. I could save every data item one by one into a file, and then read it back one by one, but this is a painstaking and errorprone process. I found some articles about serialization/deserialization into an XML-file, but I cannot quite grasp it (yet). I am not sure if the serialization works with collections. Simply put this is what I want: (<<< is what I need to know>>>>) 1- create a (public) collection and fill it with all kinds of data 2- invoke a Save command, and obtain the filename and path to save to 3- <<< store entire collection into said file >> ...Show All
Visual C# Property accessors - overriding one, adding the other
Hi all, I ran into something odd today, and I feel like I must be missing something stupid because it seems so simple, but C# doesn't seem to give me a way to do it. I have an abstract base class with an abstract property with only a get accessor. Then, I have another class that derives from this base class. In the derived class, I want to override the get accessor and I want to add a set accessor. I can't identify any way to do this. Is it possible Thanks, Kevin James: Using "new" instead of "override" won't work here. The compiler will complain that you haven't implemented the inherited abstract get accessor. Option B is a good suggestion in some situa ...Show All
SQL Server CTE Error: Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause,
I am having this error when using execute query for CTE Help will be appriciated As Jens noted, you haven't showed us any code... But I'm betting you just need to use a semicolon before the "WITH": ;WITH myCTE AS ... -- Adam Machanic Pro SQL Server 2005, available now http://www..apress.com/book/bookDisplay.html bID=457 -- < dba_sql@discussions.microsoft.com > wrote in message news:35bbde4b-222b-4311-8087-09d80efaa94b@discussions.microsoft.com ... I am having this error when using execute query for CTE Help will be appriciated ...Show All
Windows Forms Bug in VS.NET 2003?
Ok I had some time to make a sample project to demonstrate what I feel is a bug. Either that or I am doing something wrong here. http://www.myshack.net/fotty/VSBugSLN.zip Here is a link to a simple windows form app project and class library project (both part of same solution) Zip contains only the uncompiled project files. the class library contains 1 class which extends to textbox class (just makes the font red, this is just to illustrate the fact that its a class inheriting from a control) the windows forms app contains just 1 form, and references the class library project. Open the project, and compile it in debug mode prior to viewing form1. This is because the class library DLL needs to be compiled before it can be used on the fo ...Show All
Visual Studio Need help: Graphical designer for my XML file
Hi folks! I am a newby in this forum and this is my very first post. Our company develops a component-based framework based on .NET 2.0. For this framework, I'm currently working on a solution generator. The idea is simply that we create a processor which creates a complete VS solution from an input file which describes the application using xml. To manipulate this xml file, I want to create sort of a graphical designer (e.g. like the class designer in VS). Currently, we have only a simple TreeView to edit the xml which isn't very impressive... Thanks for your quick response! swisscklash79 Have a look at the Domain Specific Language support in VSIP (google it). It has a steep learning curve but it allows you to create designers ju ...Show All
Visual C# Zebra TLP2844 USB Printing
I've just taken delivery of this printer, and having worked with a mobile zebra printer recently, I figured it would be relatively simple. I'm having problems printing a label from within my application, and I get a PInvoke error when trying to use the RawPrintHandler class. Does anybody have any hints on how I print to it within my application I've created a print dialog and a print document, but all I seem to get is the actual text I'm trying to send it. I've tried EPL and CPCL, both just come out as text. I'm using Visual Studio 2005, I've installed the latest drivers and firmware from the Zebra site. Hi, I'm trying to print in a Zebra TLP2844 using a Pocket PC, but I am really new on that ...Show All
Visual Studio Express Editions Drilldown comboboxes
Hi, Please can someone point me to a C#2005e solution for access-style cascading comboboxes where users drilldown their selection to find what they want. eg: Combo1 : Country -> Combo2: State -> Combo3: City An example is found here : http://www.candace-tripp.com/download/2table_cascadecombo2k.zip or http://www.codeproject.com/cs/miscctrl/DrillDown.asp Thanks ! Thanks for your time. My country table has the fields Country and CountryID. So when user selects the Country on cboCountry the countryID needs to be passed to the Filter. How can I code that theView.RowFilter = "CountryID = " + //this.cmbCountry.Text;// ...Show All
Visual Basic deployment and setup project
Hi, I am using visual studio.net 2005 to develop a project, now I want to make a deployment and setup package for my project. I have some problems on that. First of all, in my project properties, the section "publish" includes many options for publishing a project. Now in my project, I need to have some prerequisites, and some third party dll components. when I publish in my project, it works very well, however, when I bulid setup project to do that, I don't find any entry to insert these requirements; Secondly, when I build setup project, and add project into my setup project, I notice I can make shortcut in desktop and start menu, but I don't know how to make connection between the shortcut and application or helps file; ...Show All
Software Development for Windows Vista SHaring Data on PC and across the Local network
So after about 30 setups my application actually installs on windows vista now. If you haven't tried to install a database on vista yet that can be shared amongst 2 or more users on the same machine you just haven't lived <g>. Its really fun! If you want a fun test, try to take a simple microsoft access database and install it on a windows vista machine so that 2 users can read and write to it. Despite days of work, hours of cussing and many posts on the msdn forums with other angry developers with this same issue, we actually managed to get this to work. We placed our database in a subfolder of the system defined Microsoft Common Application Data folder (CSIDL_Common_AppData) like so c:\programdata\[applicationname] ...Show All
Game Technologies: DirectX, XNA, XACT, etc. My 2D particle engine now available
here > http://www.codeplex.com/Wiki/View.aspx ProjectName=mpe Here be my first contribution to the XNA community, a fast, powerful & flexible 2D particle engine that can easily & seamlessly integrate into your game project. Features: Completely drag & drop, no code required! Complete control over scale, alpha, rotation and color at all stages of a particles life. Definable random variation of particle speed & lifespan. 5 emitter shapes - Point, Spray, Circle, Ring & Spiral (more to come!) Extremely easy to add custom emitter shapes! Hope you find it useful, there's still a few things to iron out but i think it's near enough usable right now :) Jeff Johnson wrote: ...am I just totally missing it ...Show All
Visual C# Comparing objects
Is there a clean way to compare 2 objects of the same type Id like to know if object of the list has the same .... member values ... is there a way to do it by reflection maybe GoDaddy wrote: Is there a clean way to compare 2 objects of the same type Id like to know if object of the list has the same .... member values ... is there a way to do it by reflection maybe You have then two options either perform the comparison manually by comparing the state of both objects or use reflection. Either solution come with their advantages and disadvantages. For example when you compare the state of both objects manually a lot of manual coding is involved that is propably exclusive to the type of ob ...Show All
