|
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 )
|
|
|
|
|
hi i have came with this line of coding to displaying data on chart but it doesn't display anything and it doesn't give me an error.what 's wrong with this code.
Chart1.DefaultSeries.ConnectionString = @"Data Source=DAKESERVER;Initial Catalog=Customer;User ID=sa";
Chart1.Series.SqlStatement = "SELECT Name FROM CustomerDetails";
Chart1.SeriesCollection.Add()
Mamphekgo
|
|
|
|
|
No-one knows. There is no chart component build into ASP.NET, so we'd need to know what component you're using, and then we'll probably tell you to ask the people who wrote it.
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 )
|
|
|
|
|
Hi,
I m having following problem while dedugging the site having gridview.......
Cannot open database "Test" requested by the login. The login failed.
Login failed for user 'PC6\ASPNET'.
|
|
|
|
|
Well, a good place to start might be to make sure that the user has permissions to access the databse, run stored procedures, etc.
|
|
|
|
|
this code keeps coming up on my first page.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC31019: Unable to write to output file 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_loggedin.aspx.cdcab7d2.1-wj1so1.dll': The directory name is invalid.
What should I do to run the asp.net file on my server?
-- modified at 6:56 Wednesday 22nd August, 2007
BiG RaLpH
|
|
|
|
|
|
Hi all,
I started with an intranet site for our company, so I'm using windows authentication for the site access. I had a look at the configuration tool provided in Visual Studio 2005 and added the roles of administrator, editor and browser.
The idea is that the users will default to browsers role, so they will only be able to view the intranet site, but I want to assign different access levels for the managers of the departments, that is why I have administrator and editor. So the managers of the departments will be able to edit the content of their departments but not of the other departments, and the rest of the department will only have browse capability.
So my question is how do I assign those specific users those roles?
Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
Hi friends,
How to refresh panel control in asp.net2.0.I have to refresh only the panel control not the page only panel control........
kirankumar
|
|
|
|
|
You have to add this panel control into ASP.NET Ajax Update Panel.
For more ~ ASP.NET Ajax[^]
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Use Javascript like something below.
Assuming you need to update a button with id "TestButton"
document.getElementById("TestButton").Value = "TestData";
If you require it to be more complex operation you will heva to use the XMLHttp object to retrieve value and use JS to update the control.
Thank you
Laddie
|
|
|
|
|
we want to load images to our web page at the time when we scroll down . because there may be 100-1000
images .so loading all the images all together id inefficient.
thanks
jophin
|
|
|
|
|
Ajax to the rescue. You've to track the page scroll (or control scroll) event and load the picture if the scroll value exceeds a given height.
SG
|
|
|
|
|
Hi,
Hope every one is fine. I am developing a website using ASP.NET 1.1. My site is working fine in Internet Explorer but when i run it on Firefox the alignment of controls changes and site looks deshaped...further more if i run it on NetScape only the login page is displayed and when i login every thing goes blank, no page or control is displayed.
Kindly tell me what is the reason of this problem and how to overcome it? Somebody told me that there is a option in properties of project which enables site to be displayed same on every browser, can any one tell me where is that option?
Thanks in advance,
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|