i have 1 master page with 5 pages that call it. now on the master page, I have few dropdowns and textboxes, and the calling pages only have a small article in the corner. I want to start a session on page_load event, so that if the user chooses to select a dropdown or put data in textbox, even if he clicks on the other 4 links of other pages, the data should stay.how can this be done?
I'm fiddling with sessions in asp.net in a http module.The problem:
session("whatever") = "something"
is set on page_load I need an event in the http-module which is executed after page_load, and in which I have access to the session in System.Web.HttpContext.Current.Session I was looking at this HTTPModule Event Execution Order? but I can only get the session in PostAcquireRequestState, which obviously comes before page_load...
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.
I want to launch a browser session from a Windows App to load a specified file using system.diagnostics.process.start("http://www.abc.com/doc1.doc") but I'd also like to specify that there shouldn't be a toolbar etc. on the browser window. Is this possible?
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
I have made my application to start automaticly when windows start (registry ../currentversion/run/appname + path). In this mode the application start minimized and an little icon appear in the notification icon area. With this icon you can maximize the app or exit it.If you exit the app and start it again using the Menu (Start/programs etc) than the application start in minimized mode (and in this case I would like to have it in normal mode) because the setting autostart is still true.Is there a way you can detect when the application start when windows startup using the above registry or when people click on an icon in the programs menu (or desktop)?
how to override the page_load or any other base page event every time in an application? I keep finding half examples and answers around the web. I want to fire this method every time a page is loaded.
I am upgrading a 1.1 web app to 4.0 and am running into an issue with the page_load of a custom user control firing twice, both being treated as non-postbacks (IsPostBack is false in the case). I have read around and it seems that there are 2 culprits to this, 1 being an img tag without something in the src part (which there are no images on this page at all) or 2 an issue with AutoEventWireup and Handles being used at the same time. I have looked through all my code and there are no Handles keywords in there at all and AutoEventWireUp is set to true on every page, yet I still get this issue.
have a look at my VB/ASP code and tell me if you can see what's wrong (I highlighted the important segments in red):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <%@Page Explicit="true" Language="VB" Debug="true"
[Code].....
Basically, I'm trying to get the Page_Load subroutine to execute on the page load, but it doesn't seem to be called. I'm assuming that because I set my feedback label to "feedback" in the Page_Load subroutine, I should see it displayed on the page saying "feedback" on first loading the page and every time I refresh. But this doesn't happen. I'm lead to conclude that the Page_Load subroutine is not being called on the page load.
I am trying to set the class attribute of a list item on page load. Dim liItem As HtmlGenericControl = DirectCast(Page.FindControl("default"),HtmlGenericControl)liItem.Attributes.Add("class", "active")
This code doesn't work, not quite sure why.This is the error it is generating "NullReferenceException: Object reference not set to an instance of an object"
sub Page_Load //Get data form databse and show it end sub sud deletsome(Source As Object, e As EventArgs) //delete one record when user click on submit button end sub
When I click the button, the page reload, all the data have no change, I must re-enter the page again, the record I have delete disappear. Can you show me why? The full code here:
i have a question ( i am learning VB) is there is a way in vb.net to make the Me.LoadComplete loads after the client side , i develop this simple code to make it easy to understand my question
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadComplete MsgBox(myhiddenField.Value) End Sub
[Code]...
when the page loads , the MsgBox will be empty but when you click the link button the MsgBox has the value you set in the javascript , so i assume that the page_load function gets excuted first the question is how can i load the client content before the page_load ?
I'm just starting out looking at asp.net. I've got this code that works in VB, but not in asp.
I've put this in the page_load:
Dim db_con As SqlConnection, ssql As String, db_cmd As SqlCommand, rdr As SqlDataReader db_con = New SqlConnection("Data Source=myServer;Initial Catalog=processes;User Id=usrID;Password=mypwd;")
[Code]....
why this wouldn't work in asp.net? The issue is that the label is blank. In vb.net as soon as the form is shown, the lable says "It connected".
I have a problem with running code in the right order. What I am trying to do is updating a session state variable when I press a button. When I run my code it always runs the event handler for the button after my page_load function.The reason why I need to run it after page_load is that, thatI add a line to the textList. Which the loadGui() should add to a table. The table has a remove button for all lines so the loadGui() function can not be added later becuase then the event handler of the remove buttons wont work.
User press the add button which add a row in the TempResponse Session(TempResponse) gets updated loadGui() runs and includes the newly added row Sub Page_Load()
I have an default.aspx page that I'm trying to have redirect the user to a different page depending on whether or not their deviceId is stored in the SQL Server database. It should direct the user to the login.aspx if the record for the user is found or to the newdevice.aspx page if there was no record found. I want this to occur on Page_Load but have not been able to figure it out so far.
I am populating the DropDownList ddlItems in the Page_Load event. I am then changing the current selection of the DropDownList in the Page_Load event but the dropdownlistbox.SelectedItems aren't firing up. Can anyone please help me? The dropdownlist keeps on repopulating and I cannot stick with one value that I have selected.Here's a screenshot of the problem.I want to have the value LK00260 selected when I PostBack.Instead of having to see "Add New Item" everytime I postback OVER AN OVER AGAIN.
[code]...
I don't want 'Add New Item' to show up everytime I repopulate the box. Instead, I want a value that I have selected such as 'LK00260'. Can anybody please help? I have AutoPostBack set to true already.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" nherits="test" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[Code]....
Code Behind I do some processing in Page_load method and redirect to other page but it might take some time so I want to show user loading image.But it shows that after page_load is completed.How to handle this ?
I have a jQuery modal that pops up when a customer clicks on a link on one of my product pages (which is a classic asp store...) This modal contains an Iframe, Within this Iframe sits my .net vb form.
The src= for the Iframe is populated with script when the link is clicked.when the form is loaded within the Iframe I have a SQL insert on page_load..For some reason Im getting 3 inserts into the database instead of the one? when I debug my app locally it works perfectly. Can anyone help? Perhaps somone knows a better way of achieving what im trying to do? I want a sexy modal that pops up with my .net form in it from my classic asp page..
If Request.QueryString("ID") = "" Then folderDirectory = Global.FileUpload.GetFolderDirectory(Request.QueryString("TFID")) If Not File.Exists(folderDirectory + fileName) Then If Not Directory.Exists(folderDirectory) Then Directory.CreateDirectory(folderDirectory)
Im making a site in Visual Studio using vb and I have a variable in page_load but need its value in the event handler of a button for passing on session.
I have two radio button on my asp.net page, with AutoPostBack = True When I click on either of those, they each set a flag SaveData=False However, when I click on them, the page_load event occurs first, so the page_load event saves the data, then the radiobutton_OnCheckedChanged event is triggered. How can I trigger the OnCheckedChanged before the page_load event?
I have custom asynchronous WebRequest class that I am testing to find out how fast the request will be cancelled and found some odd results, that starting 6 WebRequests with TPL and cancelling them right away takes 25 sec, but when I used just regular background threads it took only 5 sec.
Update: Running them without cancelling takes with Task.Start 9 sec and Thread.Start 3 sec accordingly. Imports System.Net Imports System.Threading
I'm using Process.Start to start an external command line application and using the StartInfo.Arguments method to send parameters to the application. I imagine I'll need to use a loop... but I can't figure out exactly how yet.I need to send anywhere from 1 - an infinite number of files names to this application. Each file has to be sent one after the other. So once the first one is done, I need to loop back around and past the second one.I can probably use the Directory.GetFiles method to get all of the files, but I don't know how to assign them.
I created 3 timers, i want each timer to take turn start which means timer1 stop then timer2 start, once timer2 stop timer3 start. But my code seem to be running together once i click the play button.And is there any ways to easy control how my picturebox move? Because my code for controlling it movement need to keep finding the correct number for it to move.