Asp.net - Store ItemList In Session
Jun 27, 2011
i have the follwong database structure
[Code]...
in the category Table (CatType is either product or services store as "P" OR "S") im using SortedList to store session of product or service my problem im using productId as Key in the sortedList however there might be situation where ServiceId and productId as identically i would like to get some adivce how i can redesign or improve this code
[Code]...
View 1 Replies
ADVERTISEMENT
Oct 19, 2011
We want to store session in SQL Server. We have sessionState mode="SQLServer". I have been given a sample connectionstring as listed below. In this it is having both stateConnectionString and sqlConnectionString. Why do we need stateConnectionString when mode="SQLServer"?
<sessionState mode="SQLServer"
cookieless="false" timeout="20"
stateConnectionString="tcpip=XXX.XX.XXX.XXX:42424"
sqlConnectionString="data source=XXX-FFFF-sql2k8,2025;
[code]....
Note 1: SQLServer mode stores session state in a SQL Server database. Using this mode ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm. To use SQLServer mode, you must first be sure the ASP.NET session state database is installed on SQL Server. You can install the ASP.NET session state database using the Aspnet_regsql.exe tool
Note 2: StateServer mode stores session state in a process, referred to as the ASP.NET state service, that is separate from the ASP.NET worker process or IIS application pool. To use StateServer mode, you must first be sure the ASP.NET state service is running on the server used for the session store. To use StateServer mode in a Web farm, you must have the same encryption keys specified in the machineKey element of your Web configuration for all applications that are part of the Web farm.
View 1 Replies
Mar 18, 2012
I have created a html viewer in VB .netall is good except when a new window appears (when clicked on target="_blank") it shows internet explorer's form instead of mineand my PHP program shows this error "Site ID is missing from session data!"
View 2 Replies
May 15, 2010
the dropdown list is showing data from database, but how to retrieve the selected value and store it in a session variable??
View 1 Replies
Mar 24, 2009
I have a combobox, which I use to store the ComboText as well as the number of times that particular word(s) was clicked on inthat session. The code I use for the Combobox looks like:
Code:
Private Sub cboSSCourse_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboSSCourse.SelectedIndexChanged
[code].....
The problem is, once it has found a duplicate item, it stops counting.What I'm trying to say is, it finds ASP 2 Advanced as a duplicate, with its "click time", it finds Dreamweaver Advanced as a duplicate, but doesn't find its "click time"I need to find the items, then add together all their respected click times, for example: ASP 2 Advanced has 5, then 2 So the total must be 7 Dreamweaver Advanced has 1 and 1 so the total must be 2?
View 10 Replies
May 18, 2010
I did try to build a custom control but unfortunately i couldn't make it work due to lack of knowledge.I wanted to build an custom itemlist that allowed me to add 2 or 3 icons beneath it with labels associated.
View 5 Replies
Dec 8, 2011
I am storing a session variable that a user types into a textbox. With their valid input, their session gets created and they get a little more functionality than the regular end users of the site.I was wondering if it is possible to find a way to add someone's session variable to the end of a URL. This way we can email a link to one of our clients, they click it, and their session has automatically begun. They already have the textbox to enter their code into, but I was told that it would be much easier for the users to just click a link that will start their session.
View 1 Replies
May 28, 2009
On startup of my software which i developed in vb.net, it connects to mssql server. I want to have session id or session number of the connection with mssql. I'm sure it is unique number and i want to use this session in my software for different purposes. My question is
1. is there anything like session id or session unique number when you connection mssql server
2. if yes to 1 then how i can get it in vb
View 1 Replies
Mar 22, 2012
I am coding a program that will allow the user to input 5 payrolls for Store 1, Store 2, and Store 3. The total of the 5 payrolls are then added together and shown in the respective Store's labels. A total label is also there to add up all the totals into one number. The numbers in the label must be in currency form. My problem is the numbers don't add correctly when I hit calculate. The first two numbers add together, but then after that the number just seems to subtract a random amount.
So far I have this --
Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
[CODE[...
View 14 Replies
Feb 19, 2009
i know that integer is a variable to store whole numbers and that a string is a varialbe used to store any text, but what variable type would you use to store a number that has decimals?
View 7 Replies
Apr 15, 2012
"Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables--a part number (type String), a part description (type String), a quantity of the item being purchased (type Integer) and a price per item (Type Integer). Your class should have a constructor that initialize for each of the four instance variables. Provide a property for each instance variable. If the quantity is not positive it should be set to zero. If the price per item is not positive it should be set to zero."
I attached the code I have. obj is underlined and says "Argument not specified for parameter 'Invoice4' of the 'Public Sub New (Invoice1 As Object, Invoice2 As Object, Invoice3 As Object, Invoice4 As Object)' and so the program won't run. What am I doing wrong?
Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim obj1 As New Invoice(Val(TextBox1.Text))
TextBox1.Text &= obj1.Invoice1 & vbNewLine
TextBox1.Text &= obj1.Invoice2 & vbNewLine
TextBox1.Text &= obj1.Invoice3 & vbNewLine
TextBox1.Text &= obj1.Invoice4 & vbNewLine
[CODE]...
View 14 Replies
Nov 17, 2011
I'm trying to do an scrape a web page but in order to Post the data I need a web session ID like
web_session=HQJ3G1GPAAHRZGFR
How can I get that ID?
My code so far is:
[Code]....
View 1 Replies
Feb 26, 2011
I have a page, a session starts on page load (using global.asax) the user may not move from (or interact with) that page for a long while and I dont want to increase the session timeout. When the session times out after say.. 20 minutes, I want to start a new one, without moving from the page. I also don't want constant keep-alives i want to do it via another method (timer, button press...)
View 1 Replies
Jan 14, 2011
Partial Class Preferences_MyPreferences
Inherits System.Web.UI.Page
Dim userID As String = Session("UserID")
This is just a page in asp.net. I want to be able to grab the Session("UserID") but every time I try, I get this error:
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \ section in the application configuration.
If I put that Dim userID inside say the Page_Load Event, then it works fine. Why does it have to be inside an event? I want to dim it once, and use it throughout the page.
View 3 Replies
Sep 5, 2011
I have an 2-d arraylist with 2 fixed columns and dynamic rows. The arraylist will be assigned to the session variable at the end of the code below. My question is how can loop thorugh the arraylist from the session to get its value?
If .SQLDS.Tables(.sSQLDSTbl).Rows.Count > 0 Then
Dim NoOfAdjType(1, .SQLDS.Tables(.sSQLDSTbl).Rows.Count - 1)
For iRow As Integer = 0 To .SQLDS.Tables(.sSQLDSTbl).Rows.Count - 1
[Code].....
View 3 Replies
Jun 4, 2012
We have implemented exam on a single page and store the option in view state as users selects the same. On select of next question page is loaded again. Sometime "If Session("User") = """ turns out true and user logs out.I did setup session on first time page load as
Session.Timeout = 340
Also in web config file session timeout is 2 hours.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Session("User") = "" Then
Response.Redirect("Default.aspx")
[code]....
View 3 Replies
Jan 15, 2010
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack = True Then
[code]....
Three buttons-ABC,CBA and Show. if you click on ABC and then Click on Show button The textbox shows "ABC" but when I Clicking on CBA button And then Click on Show button The textbox shows again "ABC". IsPostback property will true on each time the page is posted to the server. So the session reset the value.
View 3 Replies
May 14, 2012
I have an ASP.NET application that I am developing. I'm using session variables within the app.In Firefox & Chrome, they all work.But in IE (ver 9), there's one variable that's not working. I'm not sure if it's a storage or a retrieval (or both) at this point. The variable in question that I'm storing is a List(T) type. It's the only one of it's kind that I'm using. Can't help but think there's a correlation there.One other old post mentioned the possibility that cache is causing the problem, but I didn't understand the answer very well.
Dim Rec_IDs As New List(Of String)
Rec_IDs = Session("Rec_IDs")
and
Dim Rec_IDs As New List(Of String)
[code].....
View 1 Replies
Jun 3, 2012
As in the title, How to get the session value from asp.net web-service ?
View 1 Replies
Jun 25, 2012
I still new using Asp.net with vb.net
Protected Sub login_Click(ByVal sender As Object, ByVal e As EventArgs) Handles login.Click
Dim querystrings As String = "Select Email, Password ,Roles, Nama_Depan, Nama_Belakang from Employee where Email = @email;"
[code]....
View 5 Replies
Apr 11, 2010
how to POST to a php file form a vb.net app: http:[url].... So now I've logged in the user user by posting their username and password to the php file, the php file then does security/checks they exist/etc and if both username and password are correct is stores the user ID in a session variable.Now if the vb.net app tries to download data off a page which needs the user to logged in, it checks this by doing:
if (!isset($_SESSION['uid'])) {
header("Location: index.php");
}
However after having logged correctly in the app the session variable is not set.How does session work with a vb.net app like this?When the user logs in successfully should I download the user id and keep it in the vb.net app and then post it to each page that requires authentication?
View 4 Replies
Jun 28, 2010
I am using visual basic ADO reference to connect to Teradata database. In the code I hold the metadata in the volatile table, However after fixed number of SQL execution statements the session changes thus erasing all the data of the previous session stored as volatile tables. Is there a way to keep the session same during the execution of the code.
View 1 Replies
May 11, 2012
Am having a problem with session id. I wanna know if it is possible to restart the session id with vb.net... lets say...enter a web application and my
[Code]...
View 1 Replies
Jun 7, 2010
I have written a page with an iFrame that basically cycles through a series of internal pages on our server displaying daily activity for our company. The problem I think is that it sporadically loses its session and redirects back to the login screen to keep losing its session which is the default behavior for anyone on our site trying to access a webpage without being logged in.
I have set the session timeout to 4hrs, the iframe cycles through 6 pages anywhere from 10 seconds to 5 minutes on each, and I have even set the META refresh on the page to refresh every 3 hours. I don't understand what else could possibly stop this page from staying active.
View 3 Replies
Jun 5, 2009
I have an aspx page with a button, the user clicks the button a session variable gets set, I then read the session variable later. here is an exaple of my button:
<
td style="width: 100px" align="center">
<asp:Button ID="btnCiv" runat="server" Height="32px" Width="50px" Font-Bold="true"
[code].....
Everybody seems to come up empty after the initial setting of data.
View 4 Replies
Jul 6, 2011
I programmed my website using visual basic code (via microsoft expression web) and need to post information to a remote location using a php page. How do I take variables from my visual basic code and transfer them to my php code? I was thinking sessions would work, but I haven't figured it out yet.
View 7 Replies
Apr 9, 2010
In ASP.NET/VB.NET 2005 I've created a small web app with two forms.
In Default there is a button and a text box and a link.
When you press the button whatever is in the text box is put into the Session. [code]....
View 2 Replies
Jun 28, 2011
I am building a User Management section to a website CMS.The user has a list of users and then clicks the edit button, the system then stored the UserId in a session and goes to the editUser.aspx page which will show the users details.To get the users details I need to convert the UserId session to a Guid so i can get user details.
I keep getting error message:
System.InvalidCastException: Specified cast is not valid.
Dim selectedUserId As Guid = CType(Session("strUserId"), Guid)
Dim mu As MembershipUser = Membership.GetUser(selectedUserId)
View 2 Replies
Mar 13, 2009
I like to create a session value that expires in 5 minutes.How to do that, do I need to manually compare creation time when I read it?
Session("sessionval") = myvariable
Session("sessioncreated") = now
View 7 Replies
Mar 6, 2012
Ok, so I have this code written in C++ that call the function SetThreadDesktop. I call this function from a dll when running as System user on Windows XP.
When called from a C# console application, the function succeeds, but when called from a VB.NET console application, it doesn't. With GetLastError, I saw that the error message was this:
SetThreadDesktop failed with error 170: The requested resource is in use (translated from french)
How does it come that it works for a C# console app and not for a VB.NET one? Btw, it doesn't work for a winform app neither. Is it a compiler option that I have to change?
View 2 Replies