Just change this:
sqlReader = sqlCmd.ExecuteReader()
If (sqlReader.HasRows) Then
'This grabs the details for the specific centre from the database using the data reader.
ListBox1.DataSource = sqlReader
Dim table As New...
Well that is not possible by default. Rather you have to create a virtual directory in IIS for the folder which is not in the scope of your website.
Then you will be able to access the files inside that folder.
Try something like this (please be aware that test.txt needs to be located somewhere into the web app):
Dim MyTestFile As String = IO.Path.Combine(Server.MapPath("~", "test.txt")
If IO.File.Exists(MyTestFile ) Then
Dim sr As New StreamReader(MyTestFile )
Actually it works for me too. When i run the project the dropdownlist is populated correctly.
However you should first ADD the Dictionary items and then use Insert method e.g.
RegionList.Items.Insert(0, new ListItem("---Please select---", "0"))
Well you can reference the Insert button using the FindControl method from DetailsView e.g.
Dim InsertButton As LinkButton = CType(Me.DetailsView1.FindControl("MyInsertButton"), LinkButton)
However, i would suggest to use template for...
Just add this code to the button TAG(s) and it will work:
OnClientClick="return confirm('Do you really want to insert this data?')"
So now, a pop up will come up with the Question. If they hit Ok, the page will post back and save the information, if they hit cancel, the form will be not submitted.
Hey i am trying to help you while You are trying to be funny. And again it does not work. At least it does not work in a way you explained that you want it to work.
However if you are happy with that then i have no reason to insist. It works woohooo .. cool