Alexnaldo Santos's Q&A profile
Windows Forms To:ahmedilyas and the rest
hi i have these code here.. but i could not retrrieve the value from the textbox in the grid view ..Any idea that if my logic is right The textbox is created using template in VS 2006 web form. string description = gvReceive.Rows[0].Cells[1].Text; string prodNo = gvReceive.Rows[0].Cells[1].Text; string suppID = gvReceive.Rows[0].Cells[1].Text; // Below code doesnt get the value from the textbox foreach ( GridViewRow row in gvReceive.Rows) { // Selects the text from the TextBox which is inside the GridView control string textBoxText = (( TextBox )row.Cells[5].FindControl( "TextBox4" )).Text; Label1.Text = textBoxText.ToString(); } Please help ! Your sinc ...Show All
Visual Studio Express Editions Changing a text feild value
When a user clicking a button, how do i make it so that a certain value is added to a text feild i get this error: error C2059: syntax error : 'private' error C2143: syntax error : missing ';' before '{' error C2447: '{' : missing function header (old-style formal list ) im using this code: private void num0_Click(object sender, EventArgs e){ results.Text += "0"; } ...Show All
.NET Development How to retry last statement in try{}catch{} block?
Hi, I have following code try{ Someobject.Execute() } catch (SomeException) { } I'd like to retry Someobject.Execute in case SomeException is thrown, how can I do that Put it inside a loop. Something like: for (int ix=0;;++ix) { try { Someobject.Execute(); break; } catch (SomeException) { if (ix > MAXTRIES) throw Exception("I give up"); DoSomethingToMakeExecuteWork(); } } ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA - Microsoft lack of vision
Its real sad that Microsoft, once again, shows this lack of vision for a games development tool: 1: Get visual: Don't force users to write such a lot of code to do just very little. It reminds the Charles Petzold's "Hello Window" hell of code days. 2: Provide visual tools: Let users choose the components, change their properties and write just the required code for the events. 3: Quick development means quick prototype and minimum learning curve. XNA has a lot of things to learn. Definetively it is NOT for students and hobbists. We will have to wait until someone encapsulates XNA framework into a group of visual components, that can be easily drag & dropped, inspected and tested very easily without having to learn lots of n ...Show All
.NET Development Problem Making Requests to a non-.NET Web Service
I'm attempting to utilize a web service written in something other than .NET. (Not sure what it is... probably J2EE.) I grabbed the WSDL via VS.NET (I'm using .NET 2.0, btw) and it created the proxy classes. When I make the request the remote server just returns an empty request body. After poking around a bit I discovered that their example SOAP request and my actual SOAP request differed quite a bit. First, their namespace prefix differed from mine. Their's is SOAP-ENV and mine is of course just SOAP. I assume that's fine. But then it gets more strange. The particular method I'm calling is called makePurchase. My SOAP request, however, looks like: <soap:Envelope ...> <soap:Body> <Purchase> Their example SOAP req ...Show All
Visual Basic saving an Excel Worksheet via Visual Basic 2005 automation
Hi all, hopefully someone can help with this question, I've searched some forums but not found an instance of it. I've successfully opened an excel workbook via automation from a VB2005 application. The application populates the cells with data as it is received by the application. I want to use the Excel workbook to store data so that I can in the future access that information (weather data) and display it in Graphs etc or read the data into another application. The problem I'm having is that when I close the application I can't save the workbook, however I can trigger the save dialog box and do it that way but the whole point of the application is to run unattainded and collect and store the information. Here is the code I've trie ...Show All
Windows Forms Encrypt app.config settings
I've been looking at encrypting settings in my app.config file and have come accross this article on codeproject http://www.codeproject.com/csharp/ProtectedConfigWinApps.asp , it's quite useful but it only seems to apply to MSI installs. What I would like to know is is it possibile to add an installer class to a clickonce deployed application and get it to run. I don't know about this because I don't know how to tell the ClickOnce installer to run a specified installer class. If anyone has any other methods that I can use to encrypt settings in a config file or has some code I can use then please feel free to show me :) Thanks Jon ...Show All
Visual Studio Express Editions Yahoo messenger API in Visual C++ 2005 Express
Will yahoo messenger api work with Visual C++ 2005 Express. And where do i put the API files to link and build my C++ application....I'm asking because i want to put animation characters in the background Please, please, take my advice. Go to a forum that discusses Yahoo APIs if you want help with them. I refuse to even use Yahoo, I certainly don't have their SDK on my hard drive. Others here *may* use it, but if you want to talk to a group of people who can all help with this question, then a place that discusses the Yahoo APIs is the way to go. ...Show All
SQL Server Performance is degraded drastically after migrating to SQL Express 2005 from MSDE 2000
Hi, Recently we have migrated our application from MSDE 2000 to SQL Server Express 2005(SP 1). This has significantly reduced the performance of our Windows.NET application which is developed using C#. For example : While logging in to the application two databases are being attached. Time taken in MSDE: 16 secs Time taken in SQL Server Express 2005 : 58 secs Also note performance is degraded for normal screens where data is retrived from database using inline queries. Questions: 1) Is there any special(optimum) configuration(installation parameters) while installing the SQL Server Express 2005 setup 2) Is there any query optimization to be done w.r.t SQL Server ...Show All
SQL Server Problem while using stored procedures with temporary tables in dataset
I am trying to generate a report using SQL Server Reporting Service. The dataset is passed the results from a stored procedure. The stored proc contains a temporary table. On exceuting of proc, it fetches the result but when I try to save dataset I get following error message Invalid object name '#AdditionalParams'. (.Net SqlClient Data Provider) And no colums are returned in the data set created. Any help on this would be appreciated. Thanks in advance I exceuted the proc as stored procedure. And latter I added a new field to same dataset, as it didnt had any field because it had thrown error. I refreshed the datset and I got all the dataset fields although initally it showed error and it wor ...Show All
SQL Server Telco Cube
I am building a cube for a telco company. There is among others a subscriber dimension and a handset dimension. There is also a dimension to indicate a handset switch. In the source table, this is a flag set to 1 in the month where the switch occurs. I have added this as a measure to count the handset switches and also as a dimension. Other measures are a count of the subscribers and their revenue. I have added a calculated measure to know the average revenue per user. Now I would like to add a measure to know the average revenue before a handset switch and after a handset switch. Is there a way to calculate the average revenue for all months until the handset switch measure has a value and to calculate the average revenue for all month ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Detecting a controller button press?
I'm using the following code to toggle my grid on/off at runtime: if ( GamePad .GetState( PlayerIndex .One).Buttons.Y == ButtonState .Pressed) grid1.ShowGrid = !grid1.ShowGrid; But it's badly flawed, in that the Y button is "Pressed" every time the button is down (eg. if I hold it down for 1 second, it would toggle 60 times). How can I reliably find if a button was pressed (eg. it's initial down state), without having to keep track of Up/Down states for every button myself that is exactly what my InputManager does. It keeps a record of the last state, if the state has changed since last time it fires the appropriate input event handler ...Show All
Windows Forms ComboBox Resize Oddity
I've got a problem when my ComboBoxes get resized. If a ComboBox has items populated and the Text property matches the start of one of the items, any change in Width on the ComboBox will cause the Text to change to the full item. Example: private void btnShowBug_Click(object sender, EventArgs e) { comboBox1.Items.Add("Annapolis"); comboBox1.Text = "A"; comboBox1.Width = 100; Console.WriteLine(comboBox1.Text); // Prints "Annapolis" } If I change comboBox1's Text property to "B" before resizing, this doesn't happen. Is this a bug in the framework or am I doing something wrong well does the combobox contain items that begin with "B" From what I can ...Show All
.NET Development How to choose a policy file from a set of policy files programatically in WSE 3.0?
hai, I have a web service "ServiceProvider". There are multiple client web services who want to access this web service. I want to use the WSE 3.0 turnkey policy assertion "mutualCertificate11Security" to secure the message exchange between the "ServiceProvider" web service and each of these clients. The "ServiceProvider" web service has all the required policy files for each of the client web services . The "ServiceProvider" web service has the digital certificates for all the clients. I want the "ServiceProvider" web service to use a particular policy file when it gets a soap message from a particular client. How can this be done programatically Can any one help me out Any suggestions and help are greatly appreciated. If i need to exp ...Show All
Windows Forms Acess controls in the form from static method
Hi. I am quite new to C# and not quite sure how things work. I am a class that have methods that process very long time and I need the status to be updated to the form by printing out into the textbox. I am trying to make the controls accessible, so I am thinking about writing a static method in the form class for other classes to access it. However, I do not know how to get the references and so forth of the form to get the textbox I want to show. Can someone help me out What you suggest doesn't solve the problems. private/public/void/whatever cannot be accessed from other classes. ...Show All
