|
I have a question how to abandon a session when user right clicks on task bar and selects close. I know how to abandon session in the case of user presses alt+ F4.
Share ur ideas with me
Thanks in advance,
surya
-- modified at 8:57 Wednesday 22nd August, 2007
|
|
|
|
|
I think as user closes the browser whether from taskbar or Alt+F4, the session automatically get expires.
Also u can do session null at global file with event Application_onStart
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
sulabh2020 wrote: I think as user closes the browser whether from taskbar or Alt+F4, the session automatically get expires.
No it won't be expired when user closes browser
|
|
|
|
|
When the browser is closed the session does not end. The session will only end if you end it, based off a user clicking logout or something like that. Or when the session times out. The default timeout is 20 minutes.
Ben
|
|
|
|
|
|
i have a database of lists of subjects...then in my module, i want to display all the subjects that i recorded in the listbox...
how can i do it? i already connect my dataset in the connection wizard but i can't display it in the listbox.
|
|
|
|
|
use the following coding...
String sql = "SELECT Category Name FROM Categories";
OleDbConnection con = new OleDbConnection(connectionString);
OleDbCommand cmd = new OleDbCommand(sql,con);
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataTable dt =new DataTable();
con.Open();
da.Fill(dt);
ListBox1.DataSource = dt;
ListBox1.DataBind();
|
|
|
|
|
how can i declared all the variables there?
will i put in form_load or in listbox1_SelectedIndexChanged???
|
|
|
|
|
hi all
i'm new for ASP .Net(c#) i'm developeing a web application in that i've to get informations from user then i've to genarte the aroschope for the user by using third party aroscope generaters then i've to display the aroscope details in my web page.the entier process(aroscope generating) is happenning in background then detail will be display in web page
any idea about this please give some solution.
regards
balraj thoma
|
|
|
|
|
What is an aroschope ? I assume it comes out as a bitmap, you'd just show it as a bitmap, either in an img tag, or by pushing the data into a response, and showing just the image in a window.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Did you mean horoscope?? Even google was stumped.....
SG
|
|
|
|
|
I have created one web application.If I am clicking on browser Refresh button then it is showing one message "The page can't be refreshed without resending the information" with 2 buttons "Retry" and "Cancel".When I click on Retry button the previous events are fired.
Is there any way to change/check this behaviour.
Thanks.
satyaki mishra
|
|
|
|
|
Yes. If you write your app so that any postback redirects to a new page ( which can be done by taking the data that needs to be passed and putting it on the URL ), then there's never a refresh that does a postback, it will just show the new page, and so you will never see this message.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
But thing is that after post back it has to come to same page.scenario is like this..In the grid i am showing all the pending users.Admin selects "approve request" or "reject request" from the drop downlist that is kept inside the grid and click on a Button.Then the application will send a mail to the user and it will load the same page.
so whenever I am clicking on Refresh button the previous event is fired.
satyaki mishra
|
|
|
|
|
It might not be a clean way to do things but you can save the state of your actions in the page and then check for that state each time you are about to launch them. For that, you can use the session to store a class that contains flags of the different actions you are doing. Each time you want to launch an action, you check the session to see if the action has already been done, if not, you do it, otherwise you just ignore it.
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Hi,
Please let me know how to access and assign "session variables" or "ordinary variables" in source view (HTML).
Regards,
Jagadeesh
|
|
|
|
|
You can't, they exist on the server, not the client. You can't access *anything* with HTML, although you can use javascript in your client side code to access the query string.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello Everyone,
Can anybody let me know that my dropdown menu(Javascript Menu) is being hidden by dropdown list
Problem can be sorted out by using "Z-Index=......"
But dropdownlist is windowed control tht's why it donot support "Z-Index=......"
Plz suggest me some other ways
Thnx
Your Friend
|
|
|
|
|
This behaviour is as designed and has been known about for many years.
There are a number of ways to deal with this:
1: reorganise the page (where practical) to move controls out of each others reach.
2: On an appropriate event related to the menu render the offending conrols hidden; perhaps onmouseover set hidden and onmouseout set visible. (messy).
You could also search on google for other potential workarounds for this.
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to embed "Real Player" in ASP.NET web Application to run the .Rm and other audios/videos
|
|
|
|
|
Hi all.
First thing of all, I am an absolutly newbie on asp programming.
We are developing an application which works this way:
A user validate through an asp.net page, a script at the server search an especifical attribute on AD, and redirect the user to an OWA page depending of that value without having to validate again on OWA page.
I can make the AD search script working, but when I mix this code with an xmlhttp to pass credentials to the owa page, it fails. I obtain an "ActiveX component can't create object: 'ADODB.Command'" error.
Here is my code:
<title>Single Sign-on
Dim objCommand, objConnection, strBase, strFilter, strAttributes
Dim strQuery, objRecordset, strUser, objRootDSE, strDNSDomain, strURL
Dim oXMLHTTP
Set objCommand = CreateObject("ADODB.Command")
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
objCommand.ActiveConnection = objConnection
Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("defaultNamingContext")
strBase = "<LDAP://" & strDNSDomain & ">"
strFilter = "(&(objectCategory=person)(objectClass=user)(sAMAccountName=" & strUser & "))"
strAttributes = "extensionAttribute1"
strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
objCommand.CommandText = strQuery
objCommand.Properties("Page Size") = 100
objCommand.Properties("Timeout") = 20
objCommand.Properties("Cache Results") = False
objCommand.Properties("Size Limit") = 1
objRecordset = objCommand.Execute
Do Until objRecordset.EOF
If IsDBNull((objRecordset.Fields("extensionAttribute1").value)) <> True Then
strURL = "https://exc2k3/Exchange/"
Else
strURL = "https://exc2k7/Exchange/"
End If
objRecordset.MoveNext()
Loop
objRecordset.Close()
objConnection.Close()
Sub cmdGet_OnClick()
strUser = document.all.USER.Value
strPW = document.all.PW.Value
Set oXMLHTTP = CreateObject("microsoft.xmlhttp")
oXMLHTTP.Open "HEAD", strURL, True, strUser, strPW
oXMLHTTP.onreadystatechange = getRef("XMLHTTPStateChange")
oXMLHTTP.send ("")
End Sub
Sub XMLHTTPStateChange
strURL = document.all.URL.Value
if (oXMLHTTP.readystate <> 4) then
exit sub
end if
open(strURL)
End Sub
OWA
User:
Password:
|
|
|
|
|
Hi,
I currently have a repeater that renders a series of dropdowns depending on data returned from the database.
When the user clicks next on the screen I want to cycle through the dropdowns in the repeater and stored the selectedindex of each into an array that will then be stored in session. So that if the user returns the values they selected will persist.
The code I have is a follows:
<br />
int[] intArray = new int[RemapRepeater.Items.Count];<br />
DropDownList reMapDropDown = new DropDownList(); <br />
<br />
for (int i=1; i <= RemapRepeater.Items.Count; i++)<br />
{<br />
reMapDropDown = (DropDownList)RemapRepeater.Controls[i].FindControl("reMapDropDown");<br />
intArray[i] = reMapDropDown.SelectedIndex;<br />
}<br />
However every dropdown returns a selected value of 0, as if it's picking up the values of the page when it was first rendered and not the values that have been selected.
Has anyone any ideas where I might be going wrong?
Regards
Paul Custance
|
|
|
|
|
If your drop down is data bound and you bind to the data source every time, that will reset the selected index. Use !IsPostback to only do it the first time.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
OK, I truly hang my head in shame, how could I miss something so obvious! Think I couldn't see the wood for the trees, so to speak!
Thanks Christian, worked a treat and thanks for such a prompt response
Paul
|
|
|
|
|
Glad to help
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|