|
Is there a dropdownlist control which the ID is 'DropDownList'? If no, you should replace 'DropDownList' to the correct ID of the dropdownlist control which you want to disabled.
document.getElementById('<%=Label10.ClientID%>').style.visibility = false;
It should change into below:
document.getElementById('<%=Label10.ClientID%>').style.visibility = 'hidden';
==============================
I Believe I Can fly!~~~
|
|
|
|
|
I'm getting the following error trying to debug (F5) a web application on my Vista Machine. What could be the cause?
Unable to start debugging on the web server. Could not start ASP.NET or ATL Server debugging.
Verify that ASP.NET or ATL Server is correctly installed on the server.
I'm quite pressed for time so would appreciate suggestions if anyone has already been through this, before I invest time going through it.
Thanks in advance.
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
Did you verify that ASP.NET or ATL Server is correctly installed on the server?
You can also try doing the view in browser option then Debug -> Attach to Process and pick WebDev.WebServer.EXE and see if that works.
|
|
|
|
|
Another test application runs OK using the built in VS2005 web server.
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
Hi all
Here is the situation, I have a button named "Export To Excel", Now when someone clicks the button the button gets disabled as I added the following code to Page_Load
Me.ExcelExportButton.Attributes.Add("onclick", GetPostBackEventReference(Me.ExcelExportButton) & ";this.value='Please wait...';this.disabled = true;")
Now I execute some code for generating the excel file, at the end of the event I use the following statements to open a "Save As" dialog box so the use can save it,
Response.ContentType = "application/excel"
Response.AppendHeader("Content-Disposition", "attachment; filename=Report " + System.DateTime.Now.ToString.Replace("/", "-").Replace(":", ".") + ".xls")
Response.TransmitFile(fileName)
Response.End()
It all works fine but the disabled button does not enable back whatever I do, the only way I think I can enable the button is to redirect the page to itself,
But if I use Response.Redirect next to Response.End the page redirects but the "Save As" dialog does not appear and so the user can not save the file,
any help would be really appreciated,
Thanks in advance
Sri
|
|
|
|
|
You can only send one response back to the browser. You can't both send back an Excel document and a page.
If you want to do both, you have to send two requests from the browser, one that gets the Excel document and opens in a different window, and one that gets the new page.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: You can only send one response back to the browser. You can't both send back an Excel document and a page.
If you want to do both, you have to send two requests from the browser, one that gets the Excel document and opens in a different window, and one that gets the new page.
Thanks, I think I got it.
|
|
|
|
|
Am relatively new to Asp.Net and OOP. Can someone expose me to the concept of Data Access Objects and a simple application
|
|
|
|
|
Am using the DetailsView web server control but which to validate some fields for data entry or edit. How do I validate desired fields
|
|
|
|
|
I can't log on to my web app after deployment (which I can do before deployment). Though I use aspnet in-bult Membership Provider.
Can anyone help me?
|
|
|
|
|
Im trying to build scott mitchells online photo album
in chapter 23 i built a manage categories page to enter and edit categories
in chapter 24 i built a default pge to enter pictures in the detailsview a dropdownlist
is supposed to show the category id. But the category id list stays empty
|
|
|
|
|
Can you show the code that you used to populated the Dropdownlist?
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
how do I send the code here from my desktop?
|
|
|
|
|
learningman wrote: how do I send the code here from my desktop?
send it through World Wide Web
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Do you have a email address?
|
|
|
|
|
I need the code that closes the window i'm in.
thx
BiG RaLpH
|
|
|
|
|
try this on button click
Button1.Attributes.Add("OnClick", "javascript:window.close();");
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Sandeep Akhare wrote: Button1.Attributes.Add("OnClick", "javascript:window.close();");
That would be:
Button1.Attributes.Add("onclick", "window.close();");
The javascript: protocol is only used when you put Javascript code in an URL. If you do that anywhere else, it becomes a label instead.
Naming the attribute OnClick only works in html. Using onclick works both in html and xhtml.
---
single minded; short sighted; long gone;
|
|
|
|
|
Alt + F4?
Javascript :
function CloseMyWindow()<br />
{<br />
window.close();<br />
}<br />
but if you didn't open the window then you will get a client side message box asking if the user want to allow you to close it.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
you can add a parameter to the close function.
window.close(opener=0);
This will remove the message.
Amol
|
|
|
|
|
|
Hi All,
I need to fire a query on datatable which has the parent child relationship.
Ex:
ChildID Description ParentID
A Desc1 NULL
B Desc2 A
C Desc3 A
D Desc4 A
Now my problem is that I get repeative record ie one for Parent and other for Child.
Ex:
A has BCD child
ABCD is child it self.
Please tell me how do I handle this???
Thanks is advance...
|
|
|
|
|
What exactly is the Problem?
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Thanks John.. My probelm is display problem.
Ex:
ChildID Description ParentID
A Desc1 NULL
B Desc2 A
C Desc3 A
D Desc4 A
It shows
A
B --| Hidden under Parent A
C |
D ---
B Again Child Element is shown.
C
D
And I want the display as:
A
B --| Hidden under Parent A
C |
D ---
Please help me with this.
Thanks again....
|
|
|
|
|
Hi all,
I'm trying to authenticate the currently logged on user with a username / password login page.
I have done this so far:
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
Session["sHRUID"] = "";
if (Session["sHRUID"].ToString() == "")
{
string loggedOn = Request.ServerVariables["LOGON_USER"];
loggedOn = loggedOn.ToUpper();
Session["sHRUID"] = loggedOn.Replace("DOMAIN\\","");
}
if (Login1.UserName == loggedOn && Login1.Password == "admin")
e.Authenticated = true;
}
But how can I authenticate the password?
Can anyone please help???
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|