JohnWein's Q&A profile
Windows Forms showing blank instead of value in datagrid
HI, i'm binding SQL table into datagrid via dataset and datatable. To avoid null problem, I've used '-1' as a default value of columns in sql table. All columns are integer datatype. When i bind this table into a grid, '-1' is also shown along with other valid datas. I donot have to show '-1' on grid.Instead of "-1" ,i need to leave it as blank. i tried to assign " ". It's violating int datatype rule. Is it possible to show blank instead of "-1" If so, How Thanks! you should probably remove the default and update to null where -1. until then you can select ...Show All
Visual Studio Express Editions A way to swap variables?
Does VB provide an easy way to swap the contents of 2 variables without having to use an intermediate variable Thanks... Well I made a quick function that works fine for me... Public Sub Swap( ByRef x, ByRef y) xx = y : yy = x x = xx : y = yy End Sub That works fine for me xD Hope this helped :P ...Show All
.NET Development Post XML Using HttpWebRequest
I’m writing a windows application which intern talks to a web interface exposed at http://194.224.184.162/barceloDS/interface/xml . Now my problem is, this exposed interface will accept the XML String as parameter and returns data in XML Format. You can find the example of the XML Input, at http://194.224.184.162/barceloDS/interface/example , which explains in detail about the input XML String. I’m trying to execute the following code, which returning me null text, instead of some response. Correct me where I’m mistaken. string GetResp() { // This is the Request XML String string ...Show All
.NET Development DataSet.AcceptChanges() doesn't accept all the changes!
Hi, When I do a dataset.AcceptChanges there's always one table that I must additionally accept the changes befora all my changes are accepted. dataset.AcceptChanges() dataset.tableX.AcceptChanges() There are no errors in the dataset. Does anybody know why Thanks, Filip I understand that after invoking DataSet.AcceptChanges90 you are still seeing atleast 1 table which has 1 or more changes. We tried to reproduce this at our end but were unable to do so. DataTable.AcceptChanges() accepts changes on rows that exist in its Rows collection at the begining of AcceptChanges. i.e. event hand ...Show All
Visual Studio Express Editions Private properties? I need in Module!
Hi all, I've comboboxes in my classes (design mode). How can I get the properties of this comboboxes in my module function .SelectedValue, .Visible, etc. ...Show All
Visual Basic How to keep the value of an INPUT TYPE="FILE" after postback ?
Hi Guys, I am having a simple, I suppose, problem with <input type="file"> control. I need to keep its value during some post backs of my page, but I can't. I loose it's value after all post backs. Any one knows how to keep it Regards, Marcelo. Hey, If it has runat="server", it should retain it... Did you turn off viewstate Could you post the definition or code Brian ...Show All
Visual Studio Team System Web test in Frame Pages
Hi: I am doing a web test for my web application project. After the user login, the page will be redirected to a main page that contains a frameset. I found that after the recording process, the web test always goes to the "main" page that contains the frameset code. Is there any method that I could dep into the page I want In my case, there are 2 ASP.NET pages in a frameset, user could click any link in left-panel frame page to get the result displayed in right-panel frame page. However, because of frameset, the URL address would not be changed in IE. Thanks for help! I'm ...Show All
Visual C# Add "Help" button
How can I add "Help" button to my forms Like the picture: http://img.majidonline.com/thumb/39010/Untitled-3.gif Where is the picture Where and how you want to have Help implemented ...Show All
Windows Forms Create ODBC Connection Programatically
Hi, I have developed a small application in .net. I am using ODBC connection on Windows 2000 and windows XP. I have created a deployment package for the same. Now after the installation i need to manually make the ODBC connection set in the windows control panel -> ODBC. I want to create it programatically instead of manually setting it up. CAN I&nb ...Show All
.NET Development ASP.NET 2.0 Advocacy
I am looking for some resources and/or compelling arguments I may use to help "sell" ASP.NET 2.0 over PHP 5 internally. We have a PHP based user-facing control panel application, written in PHP 4.3. Given the rich interaction model we are designing, I simply don’t think PHP 4.3 or even 5.0 is up to the challenge. Unfortunately, I work in a Microsoft-hostile environment, and I’ll need strong ammunition to prove myself right, especially if I’m going to recommend we switch platforms, which of course involves spending money. My requirements include “brandability”, which I know I can easily satisfy using dynamic master pages in ASP.NET 2.0. T ...Show All
Visual Studio Express Editions ip change notify
How can i get notify by e-mail when my IP change, sending me a message telling the new ip Thanks from now, Miranda Cause sometimes my connection reconnect, then i can't enter in my pc from another place without knowing the new ip. ...Show All
Visual Basic Database Connection in server explorer on non-default port (1433)
Using Visual Studio .NET 2005 and I cannot make a database connection in sever explorer to a SQL server that listens on a non-default port. I can do this with VS .NET 2003, but not 2005. Please assist. ...Show All
Visual Studio tasknavigated event
I am using the tasklist object in my add-in and have an eventhandler for the tasknavigated event. Here is the code in the handler: if (myTaskItem.FileName != "") { TextWindow myTxtWin; TextPane myTxtPane; myTxtWin = (TextWindow) applicationObject.ActiveDocument.ActiveWindow.Object; myTxtPane = myTxtWin.ActivePane; myTxtPane.Selection.MoveToLineAndOffset(myTaskItem.Line, 1, false ); myTxtPane.Selection.SelectLine(); navigateHandled = true ; } This code is working when I double-click and item in the tasklist or navigate the list with the arrow keys and press the enter key. The problem is when I select next or previou ...Show All
Visual Studio 2008 (Pre-release) Frame and UserControls will not expand to fit available space.
When I try to load modular content with Frame or UserControl, Frame and UserControl elements will not expand to fit available space. The size of these elements remains fixed (current fixed to MinWidth and MinHeight. ScrollView also suffers from the same problem. I'm wondering wether this is a problem with something in my code or whether it's a problem with CTP code,. Is this a known issue with the Feb CTP or am I doing something wrong If it's a known issue, I'll live with it for a while. If it's not, I'll dig further. I'm building a pretty complex UI, and the inability to modularize UI compontents due to this problem is making ...Show All
.NET Development Thread.Abort fixed for finally blocks?
In .NET Framework 1.0 & 1.1, calling Thread.Abort on another thread could abort that thread while executing the "finally" part of a try/catch/finally block. That was rather nasty because it could lead to criticial resources not being released by the aborted thread. Now I see in the July CTP docs that this situation is documented as a possibility for 1.0 & 1.1 only. May be assume that this has been fixed in 2.0, and that all finally blocks will properly execute in the aborted thread, no matter when the ThreadAbortException happens Another question: ThreadAbortException can still happen in a catch block and abort the current exception ...Show All
