I'm using some code thats new to me, and it works fine for the most part except it seems to be stacking the wkhtmltopdf.exe process in the task manager, slowing down the computer.If anyone could point out why the code isn't closing properly
I am building a web application with master page. When a user logs in I save the user details in session and use his details to retrieve data from db. I also have a logout button to clear the session and logout from the application.I want to know how the logout functionality like clearing session can be done if user closes the close button of the browser.
I have an aspx page that has a button that, when clicked, will close the form. In the code-behind, I'm utilizing the Form_Closing() Event. Is it possible to use this event when a user clicks the X (can't remember what it's called) in the top right corner that closes a browser session? If not, is there a way of programming for this action?
I am using the xmltextwriter and having issues with opening tags not showing if the field is blank here is the start of my code
Code: Dim strFilePath As String = Server.MapPath("../test.xml") Dim utf8 As Encoding = New UTF8Encoding(False) Dim objWriter As XmlTextWriter = New XmlTextWriter(strFilePath, New UTF8Encoding(False)) ' start writing the XML document objWriter.WriteStartDocument() Try conn.Open() myreader = cmd.ExecuteReader objWriter.WriteStartElement("testfile") While myreader.Read output the first "product" element objWriter.WriteStartElement("product", Nothing) objWriter.WriteElementString("Id", myreader("rvid").ToString) objWriter.WriteElementString("Class", myreader("RVClass").ToString) objWriter.WriteElementString("Manu", myreader("rvmanu").ToString) objWriter.WriteElementString("Model", myreader("rvmake") & " " & myreader("rvmodel")) objWriter.WriteElementString("Year", myreader("rvyear").ToString) objWriter.WriteElementString("Price", myreader("rvcashprice").ToString) objWriter.WriteElementString("NU", myreader("rvnu").ToString) objWriter.WriteElementString("SCapacity", myreader("rvcapacity").ToString) objWriter.WriteElementString("Fuel", myreader("rvfuel").ToString) objWriter.WriteElementString("Length", myreader("rvlenft").ToString) objWriter.WriteElementString("Air", myreader("rvair").ToString) objWriter.WriteElementString("Awnings", myreader("rvawnings").ToString)
Thats not all of it.. but what happens is if it is blank value Then i get this, as you see fuel has no opening tags, and the company i am supplying to needs these.
I am using this code.This pop up window pops up when I clicks a button on the main page.Now I want the pop up window to be closed if the password is successfully changed and reload the main page,but if the password is not changed then refresh the pop up window again.
I'm trying to make sure a block of code behind properly closes a connection to SQL after it's finished. But when I add the line "cmd.Connection.Close();" Visual Studio underlines "cmd" in green and says "unreachable code detected" What does that mean and how do I correct it?
I have a page.. which im trying to implement a gridview that allows you to select from it, it will open a modalpopup with a list of records linked to the selection.. now within that popup, you can pick a individual record so you can see full details..So my question is, can you have multiple modalpopup's open at the same time? If not then is there anyway to reopen the first popup with the list again so that you can pick another record
I have a web page with a button. When I press the button something happens (it doesn't matter what). What I want to do is: when I close the browser (the page is closing, too) I want to call the button1_click event. How can I do that?
I am using this code.This pop up window pops up when I clicks a button on the main page.Now I want the pop up window to be closed if the password is successfully changed and reload the main page,but if the password is not changed then refresh the pop up window again. I used javascript for form validationenter code here Here is the code.....
I seem to be missing something obvious here, but cannot see what it is. My problem is that the closing form tag for BeginForm is not being added to my markup. I am looping through a collection and creating a form for each item, but the forms arent closing properly.
<% foreach (var item in Model) { %> <% using (Html.BeginForm("EditUser","Users")) { %> [code]...
I'm having some problems with connections to an SQL database not closing after being opened, which is maxxing out the pool and causing the site not to load any of the dynamic content (until eventually unused idle connections get close, as the problem seems to go away after a while).
I've been through my code several times and can't figure out where things are not being closed properly.
Is there a surefire way to make sure these connections are properly closed? Or to pinpoint where the problem lies?
Most places in the site I am using ObjectDataSource. You don't need to close a connection when using that, do you?
Where ObjectDataSource isn't used, a developer wrote this method and put it in a class file called "common.cs":
[Code]....
I searched the entire solution for every instance of "common.openDatabase()", and where it occurs I make sure there is a "cmd.Connection.Close();" that follows.
Am I missing something or doing it wrong?
Here's an example of where a db connection gets opened and then (purportedly) closed:
I'm working on an ASP.NET web application. There's a bill page which has two links to different pdfs of the same bill. When you click on one of the links it takes you to a ViewPDF.aspx page that shows the pdf. There's also an option to view both in a split screen so that you can compare them. When you click on this link it takes you to BillSplit.aspx which has a frameset and two frames that both point to ViewPDF.aspx. This all works perfectly.
The problem is that if an error occurs while pulling up the pdf. The application has an error page that has a few links back into the application. If you use one of these you can go back into the app and continue but now inside the frame. The URL still says BillSplit.aspx but the application is completely unaware of this since frames are HTML elements not asp.net controls.
What I would like to do at this point is detect that you've returned to the application and close the frame you aren't using. Essentially I'd like to redirect you away from BillSplit.aspx and to the page you're actually requesting. I'm pretty sure this would need to be done in Javascript either on the BillSplit page or on the pages that you go to later. So I guess what I'm asking is, is there a way to ensure that the BillSplit.aspx page and it's two frames point only at ViewPDF.aspx?
I am using a AccessDatasource for getting values from a accessdatabase for a Dropdown list. After i load the page and close it, a .ldb file is created. After wards i am not able to open the database manually. How to close the connection. I have given Network service Modify access [URL] to share permission, still no go.
I have a simple example of a ModalPopup with a panel that appears in the center of the ModalPopup and a couple of buttons in that panel. One of the buttons is a cancel and the other is an OK button. No matter how many other buttons that I add each one closes the ModalPopup. I need to keep the ModalPopup open so that I can run a few calculations then click a close button.
I'm using the ModalPopupExtender control from the AJAX toolkit. This control extends a panel which contains a CreateUserWizard control. However, the validation of the CreateUserWizard control causes a postback to the server, which closes the popup. I'd like the popup to remain open, even after the postback.
I am facing an issue in my application when a user directly clicked on browser close [X] button. Browser can be IE, Chrome, Mozilla, Firefox and many more.
What I want to do:
1. as soon as user hits [X] button of browser, need to set their status as logged off in database for which we have a method in Login.aspx file which is within the master page.
2. We do not have any Logoff feature in the application
i want a pop up to be displayed when user tries to close the browser and if user click on "no" [i.e. he don't want browser to be closed] then it prevent browser to get closed.
I want to Change application variable value on closing browser, Problem is; I am using sessionState mode="StateServer" and in this mode, Session_end event does not fire in global.asax
how i can detect session_end or browser close and then change the application variable?
I am working on an application that is for online examination,
I need to maintain exam info such that if unexpected closing of browser such as power failure etc, the exam will restart for the user from same last position.
I tried to do it through session state mode sqlserver but problem is what if after closing system without clearing session if some another user want to give exam from same machine?
I am not sure where this error is comming from or even if this is the right place to put this. I have this event that fires when I click a link button in the Modal Popup, and yes the link button is set to not cause validation
[Code]....
When this event fires for some reason the modal popup window closes. How do I stop this from happening. If you need more code I will gladly provide it.