I keep a Session variable when the user is logged in.
So that when the user click on btnLogout it must clear all my sessions and Log the User out for GOOD!!!
It does clear my sessions but if i click the BACK button in IE right after i logged out then i am still logged in! Meaning it goes back to screen where the user was still logged in...
What is VB's equivalent for C#'s default(T)
...
Hi, I'm new to this, so sorry if my question has been asked before. I have searched but have not been able to find, or perhaps recognise, an answer. I am using visual studio 2008 and creating an app in vb.net.
I have 4 arrays named:- account1 account2 account3 account4. They all have 4 elements.
I want to assign values to the elements i...
I am trying to build an IVR and hook it up to my website, what are the different (inexpensive) ways that I can do it.
...
If I spawn a thread with ThreadPool.QueueUserWorkItem and that thread does not reference the object that is not thread safe, would it compromise that non-thread safe object?
[Edit]
By not thread safe object, I mean a third party interface to a programmable logic controller that has no ability to open simultaneous connections or concurre...
For instance, in VB.NET:
Dim strArray(5) As String
As I understand it, because this is an array, the computer will allocate contiguous memory locations for each of the 5 elements. But how much space is allocated for each of the five elements? What if I decide to put a 5MB block of text in position 2 of the array?
Is it differen...
What should go into the top level namespace? For example, if I have MyAPI.WebLogic, MyAPI.Compression, etc. If I put classes into the top level namespace, am I violating the principle of encapsulation?
...
I have an asp.net website that is using update panels on the page that i cant get to reload from the server. I have this for the disable page cache on the master page.
'Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1))
'Response.Cache.SetValidUntilExpires(False)
'Response.Cache.SetRevalidation(HttpCacheRevalidation.All...
I am writing a launcher program, and when I go to start the process I get the "The directory name is invalid" error. Here is the code that is launching the process:
Const DEBUG_ROOT = _
"Z:\Kiosk_JC\KioskSignIn.root\KioskSignIn\KioskSignIn\KioskSignIn\bin\Debug"
Dim oKiosk As New System.Diagnostics.Process
oKiosk.StartInfo.UserName =...
I am trying to add an ID HTML attribute to a form using ASP.NET MVC and VB.NET
<%Html.BeginForm("Create", "Model", "", "", New With {.id = "CreateForm"})%>
This gives me a type error, since .id is expecting an Integer, not a string. How do add an ID attribute to my form?
...
I have an application that used Macro.
In this macro I would like to call an external executable like this:
SYSTEM( "C:\Programme\Transform.exe" ,
"C:\Programme\Vectors.txt" ,
"C:\Programme\Vectors_Compensate.txt",
"C:\Programme\Vectors_Final.txt" )
This executable reconstruct a modified file according to a...
I am upgrading a project from ASP.NET 1.1 to ASP.NET 2.0. In my aspx page, I have a hidden field, like this:
<input type="hidden" name="__TabControlAction" />
And I have the following javascript function:
function __tabStripPostBack(key) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform =...
This question is close, but it's looking for the ordinal position. I'm looking for the actual index position in a given source string.
Better Explanation:
I have the following string
"<a>
<b>zyx</b>
<b>wvu</b>
<b>tsr</b>
<b>qpo</b>
</a>"
I'm loading that string into a .NET XmlDocument object. Carriage Returns and Lin...
Hi,
I need to ensure 2 calls are enlisted in a transaction
Sub InsertOrder(order)
...insert order header SQL
....insert order items SQL (LOOP)
End Sub
I am aware I can accomplish this via a transaction scope, however, isn't there a "Attribute" available for this?
Transaction.Scope()>_
Public Sub InsertOrder(order)
End Sub
...
Attempting to execute an update command against an Excel 2007 file gives the error:
Operation must use an updateable query.
I'm using System.Data.OleDb with a connection string like this:
Dim strConn As String = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=""" & pathToFile & """;" & _
"Extended Properties=""Excel 12.0;H...
I have a program I wrote that copies select files from one remote computer to another.
The set up I for testing is, one computer(a) at home running the program connected to my work's network via VPN and two computers(b,c) at work side by side on the same network. I am trying to copy the files on computer b to computer c, while the progra...
I have a three-tier Windows Forms DB application in VB.NET. I'm using VS 2005.
I'd like to display records in a table in a DataGridView. I can already display the records as is by binding the DataSource to the business class that talks to the DB class:
Dim assetList as List(Of Asset)
assetList = DB_Asset.GetAssetListOrderByID_Asset
...
It is possible to catch an exception and throw a new exception which wraps the first exception as an inner exception:
http://msdn.microsoft.com/en-us/library/system.exception.innerexception(VS.71).aspx
Also, if I call a function and it throws a certain error, but I catch it, will the calling code's catch handler execute? If so, and it ...
Hi,
I am calling a javascript in the onclick event in ASP.NET sourcecode, as follows:
onclick='open popuplistitems("ct100$contentplaceholder..........")
Can you tell me how to do the same in vb.net ?
...
Hi, I am trying to post simple data to some site, in this example to a php file on my local server. My VB.NET Code:
Dim W As New Net.WebClient
Dim A As String = ""
W.Encoding = System.Text.Encoding.UTF8
Dim URL As String = "http://localhost/test/p.php"
A = W.UploadString(URL, "bla=test")
MsgBox(A)
and here the p.php:
<?
print_r($_P...