I am working on completing the Clear event for Button Clear Sub routine. I have been able to clear the textboxes with the code I already have. However, in playing with the application, I noticed that the memory remains stored somewhere in the program. How to both clear the textboxes, and clear the memory?
Code
Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
txtTestScore.Text = ("")
lblNumberOfScores.Text = ("")
lblAverageScore.Text = ("")
lblBestScore.Text = ("")
txtTestScore.Focus()
End Sub
Trying to write my program in vb.net 2010. I have read my 2 books and have been playing with the code a bit. Got streamreader and writer and My Namespace understood as far as text files go. Now I'm trying to get all my textboxes in tabcontrol tabpage1 to be cleared of text thru the For Each loop.
I've tried various ways and keep getting invalidcastexception error. I even changed the tabcontrol and tabpage modifiers to public. That did not work either.
[CODE]:....................
I thought the code would not only clear all textboxes on tabpage1 but on all the tabpages. The help tells me that "When casting from a number, the value must be a number less than infinity and to make sure the source type is convertible to the destination type. I have three tabpages and that is definitly less than infinity. The source type and destination type puzzle me a bit.
Here is what I got using intellisense, however it not only clears the textboxes of text on tabpage1, but it clears the labels and buttons of text too so it is not a perfect solution.
Assume I have a large dataset and I want to run a "like" function in the dataset eg column - Name..Is there any way to run a like statement in a dataset.Is it possible with ASP.NET? I dont want to run a query to the database.
As the reference values are stored in the heap as a data; where do the type information of any reference value is stored?If there are a couple of instances of class Artist; when they are stored in the heap how the .Net tags those memory blocks as type of Artist?
I'm writing a application that has to check live what's going on somewhere. The data is stored in a integer array.But this data comes from a PLC over a COM port. So imagine if someone pulled out the cable while my application is running. I have to find a way that the integer array will be stored somewhere when my application crashes. I thought maybe I could do something with a text file? But how do I get my application to store the data when it crashes? Do I have to surround my whole code with a try catch and then in the catch save everything to a text file? Well I like to know if some of you have better ideas or can point me in the right direction.
I have an application in VB.net. I am using the msgbox inside the execution of a loop. Now the message box pops up fine, but when i click on "Ok" in the pop up, the message box
I have a FormView bound to a SqlDataSource on my page. One of the controls on the FormView is a DropDownList, which gets populated on Page_Load (it's being populated with a list of file names from a specific folder).
Everything goes well when the page first loads. I am able to view the list of files, select one and, upon hitting the "save" button, store the correct filename in the database. However, when the page refreshes after the post back - the DropDownList is empty.
I have the code below which works fine when checkbox at Cell 2 is Checked ie., the date is inserted in Cell 9. Now, when I uncheck Cell 2 I want the Cell 9 to be cleared. Presently, it is not cleared after unchecking. [code]
I'll start off by saying my website has a landing page of http:[url]....
On PageOne.aspx, I have a link to another page: http:[url].....
On PageTwo.aspx, I have an link to the following:
<a href="http:[url].....
The /MyFiles/ directory is actually a virtual directory which points to a file server that holds many other files (PDF, jpeg, doc, etc.).When I navigate to PageTwo.aspx from PageOne.aspx, I can click "back" and still get to PageOne.aspx (my browser history is ok). When I click on the link on PageTwo.aspx, the PDF opens in the same window...then I can click "back" to get back to PageTwo.aspx, but I can't click "back" again to get to PageOne.aspx (it seems like my browser history has been reduced by one page).
I can only imagine that this happens because of the virtual directory since I can't duplicate this problem if the PDF resides on the same server as my .aspx pages. If that is the case, does anyone know how to get around this and still have my PDF reside on the file server (virtual directory)?
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click Dim li1 As ListItem Dim addList As New List(Of ListItem)
[code]....
Updates are happening on the load of a dropdownbox This has something to do with autopostbacks and the page load I think, can someone please help When I click the add button even if I have selected an item in the listbox, it will always return an error message. I don't think the listbox changedselected item is firing.
I am using ASP.NET. I am not sure what you will call this but I would like text to be displayed in my text box called txtName. So when the form load the text box will have faded text that will say "Required". Then when the user click inside the text box i want the user to place a value inside the text box. Is this possible in ASP.NET? If so, how can this be done????
I'm having troubles with terminating an application. When I close the main form everything disappears but the process remains active. I think I know the cause, a certain activeX component will not release properly. As soon as I create one, I can't close normally...
dim someActiveXcomponent = new X() ... <formClosing> someActiveXcomponent = nothing GC.Collect() GC.WaitForPendingFinalizers ' here it hangs
Probably a bug in that component, but the problem is that I don't have much of a choice, I'll have to use that component for now.
Calling System.Runtime.InteropServices.Marshal.ReleaseComO bject( myObject ) will kill the reference and now the application closes properly.
I've got my code to delete rows out of the database when the user clicks on the Delete button in my GridView, but the GridView isn't updating to reflect the new data changes.
EDIT 1:Did some stepping through the code and found that e.CommandArgument is not getting a value in grdQuestions_RowCommand
EDIT 1 (Revised):The fact that e.CommandArgument wasn't getting a value was my mistake. I'd changed the way it's value was being assigned without removing the previous method.The code runs through grdQuestions_RowCommand and then goes into grdQuestions_RowDeleting and then executes GetModuleData.I have a feeling that to view changes to the grid, a PostBack might be required, but I've removed all DataBinding to an If Not IsPostBack Then block because the alternative caused problems with the DropDownList whose selection is used as a reference to populate the grid (ddlModules selected the Module whose Questions will display in the grid).
DataGridViewRow.IsNewRow property is set for the bottom (empty) row. If I set a cell value in the bottom row using DataGridViewCell.Value, IsNewRow remains set. What is the correct way to programatically set a cell value in the botton row to clear IsNewRow?
I'm having this problem with a networked app in vb.net. If the program exits normally the port closes fine, however, if it crashes sometimes it remains open and I am unable to close it. The next time I run the program it is unable to open the port because it is already in use. Here's the exception: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted on how I can reclaim this port, or how I can close it? I tried using the reuse address socket option
"Create an application that will return the amount of money that remains at the end of each year." Initial Deposit: 5000 Withdrawal Amount: 500 Number of Years: 4
The following is code for a CalcButton: Dim intDeposit As Integer Dim intWdrwl As Integer Dim intRemain As Integer Dim dblRate As Double = 0.05 [Code] .....
I'm supposed to populate a multi-line textbox in one calculation, so that it looks like this: 1 $4,725.00 2 $4,436.25 3 $4,133.06 4 $3,814.72
So I am trying to change the directory where the files are beeing saved. I've made a file where the location is saved. But for some reason, when I have saved the new location and restart the application, the file is is cleared, leaving it empty.
Show Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
I'm trying to understand why my print preview is not showing the contents of the file (I've double checked that the file is in the correct directory and is not empty)
Imports System.IO Imports System.Drawing.Printing Public Class Form1
I am looking for information on how to store information that has been entered into an application form before it is cleared for new information. I would like to store it with a date and time stamp if possible.
I have a vb.net 2010 windows forms application.I use an xml file to store application information.The file is in the same format as an app.config file but is NOT the app.config file.It is stored in
Environment.SpecialFolder.CommonApplicationData
I read and write to it using xmldocument and all works fine
From time to time I get calls from clients that my application won't start
On checking this xml file I find all the key/values have been deleted.example of file.........
Assume I have a large dataset and I want to run a "like" function in the dataset eg column - NameIs there any way to run a like statement in a dataset.
In my application, i am downloading file from DMS system to my server. Once the file gets downloaded, on some environment, the iis keeps lock of the file and when the application tries to redownload the file and put the file on same location, an error is generated that file is being used by another process. Following is the code :
I've added reference to Flash object. Then dragged AxMacromediaFlash to form. [renamed Flash1]. Even after setting Flash1.Movie="file.swf".
it doesn't start playing ! I tried, loadMovie,Play,MovieData etc etc.. nothing works. There's no error, no warning, nothing. That Flash object remains plain white. am not using try catch too. I'm on Vista Home Premium 32bit, Flash player 10, Flash ActiveX version 10. Tried re-installing player, activeX. its just not working! : any known issues am ignoring here? and same file works fine if I drag it in IE. and if I check Flash1's state, it shows playing.
I'm working on VB.Net, ASP.NET. I have a web form with link button and intersoft grid. OnClick of the link button. I'm opening the popup window. The Problem I'm facing is when I click the link button all the rows in web grid(intersoft) are getting cleared.
This is my link button code to open popup. onclick of this button all the rows in the grid are getting cleared.
Protected Sub lnkBtnProfile_click(ByVal sender As Object, ByVal e As CommandEventArgs) Dim sb As New StringBuilder
I am using a toolstripDropdownbutton on the toolstrip to populate the
menuItems.The toolstrip is on the customtaskpane of the window.
Problem comes when the focus is on the customtaskpane, user opens a dropdown menu and without selecting any menu from the dropdown click on the other part of the window. The dropdown remains open and even the user switch to other window it remains open and does not hide. It only hide when user click on the dropdownbutton itself.