|
I have an UpdatePanel and I want to show a progress image when submitting in the center of that UpdatePanel....
|
|
|
|
|
That's nice. Do you have a question?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi,
i have to open a pop up window in ie7. after the pop window has opened i have to close the parent window onload of popup window.can any one help.
thanks in advance.
vishnu.
|
|
|
|
|
This is a security issue. IMO, No browser allows this.
You can close only those window programatically which you have opened programmatically (from javascript).
If user has mannually opened the window/browser, confirmation from user is a must to close that window/browser.
You may try opening the parent window also from javascript if it you are needed to close it. (Too many popups?? )
Another solution is redirect your parent window to some other link/page on load of your child window.
Hope this will help you.
|
|
|
|
|
thanks for replying me sir,
my problem is cant we close the parent window without getting the alert messeage "the page you are viewing is about to close".
i have to close the parentwindow silently on load of the popup window.
thanks
vishnu.
|
|
|
|
|
|
thank u for replying me sir,
window.opener=self works fine in ie6.but it is not working in ie7. can you give a solution for this.
thanks in advance.
vishnu.
|
|
|
|
|
|
I know this is sort of an old topic but with all the code snippets I've attempted I still can't get it to perform consistently. Essentially, I'm trying to open a PDF on a server that is not on the domain but a Workgroup. The IIS 6 server is on the domain and the files reside on the Workgroup server. I'm using VS2008/.NET 3.5
*** Code to Open File from ASP.NET page
'\\Server1\contracts\newlondon.pdf
Dim sFullPath As String = sServer + sFolder + sFile
Dim wcClient As WebClient = New WebClient()
Dim obj As UserManager = New UserManager
obj.CreateIdentity("user1", "Server1", "password")
Dim buffer As Byte() = wcClient.DownloadData(sFullPath)
Response.ClearContent()
Response.AddHeader("Content-Disposition", "inline; filename=userdoc" + oDocument.FileExtension.ToString)
Response.ContentType = returnExtension(oDocument.ContentType.ToString)
Response.AddHeader("content-length", buffer.Length.ToString)
Response.BinaryWrite(buffer)
obj = Nothing
***
*** Create Identity (which I found on CodeProject)
Declare Auto Function LogonUser Lib "advapi32.dll" (ByVal lpszUsername As String, _
ByVal lpszDomain As String, ByVal lpszPassword As String, ByVal dwLogonType As Integer, _
ByVal dwLogonProvider As Integer, ByRef phToken As IntPtr) As Integer
Declare Auto Function CloseHandle Lib "kernel32.dll" (ByVal handle As IntPtr) As Boolean
Public Sub CreateIdentity(ByVal User As String, ByVal Domain As String, ByVal Password As String)
Dim tokenHandle As New IntPtr(0)
Dim ret As Integer
Dim LOGON32_PROVIDER_DEFAULT As Integer = 0
Dim LOGON32_LOGON_NETWORK_CLEARTEXT As Integer = 3
tokenHandle = IntPtr.Zero
Dim returnValue As Boolean = LogonUser(User, Domain, Password, LOGON32_LOGON_NETWORK_CLEARTEXT, LOGON32_PROVIDER_DEFAULT, tokenHandle)
If False = returnValue Then
ret = Marshal.GetLastWin32Error()
Throw New Exception("LogonUser failed with error code: " + ret.ToString)
End If
Dim id As New WindowsIdentity(tokenHandle)
CloseHandle(tokenHandle)
id.Impersonate()
End Sub
*****
I've had it working a couple times on my workstation but never from the webserver. I usually get "Unknown username or password" or "Access to ..... denied!"
I have identity impersonate="true" in the Web.Config.
modified on Thursday, November 11, 2010 10:55 AM
|
|
|
|
|
Please use proper formatting when posting code snippets. Use the "code block" menu item to wrap all code in <pre> tags
<hr />I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Guys ,
I am Using caching to cache some my page but i want to expect some controls to be not cached , How ?
|
|
|
|
|
As per your requirement, you have to use fragment caching. So make a user control, put all the controls, that you want to be cached, and use it for caching
For details about Caching, Have a look to the Exploring Caching in ASP.NET
|
|
|
|
|
Hai,
I've provided with jitbit software to configure a forum newly for our existing website, and the forum must look like jitbit forum. My boss asked to create a sample standalone forum, which looks like jitbit forum.
I've created the virtual directory called forum in my local computer's iis, and configured it with iis of my system. I'm able to get my virtual directory run in my browser. The thing is that, when doing any operation like registering an user newly / logged in as admin with given password and when signout operation is triggered.. I am receiving the following error :
Operation must use an updateable query.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Operation must use an updateable query.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[OleDbException (0x80004005): Operation must use an updateable query.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1002416
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +255
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +188
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +161
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
aspnetforum.Utils.User.UpdateLastLogonDate(Int32 userId) +208
aspnetforum.ForumPage.OnInit(EventArgs e) +1686
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
I don't know how to proceed further. My task is to create a forum which looks similar like jitbit forum. Help needed regarding this.
Regards,
M.Sworna Vidhya
|
|
|
|
|
swornavidhya_m wrote: My task is to create a forum which looks similar like jitbit forum
I think we got it the first time.
Please provide the code around where it is updating the database with the last logon date because that's apparently where it is going wrong. Specifically your insert/update statement appears to have an issue with it but I can't tell anything else without seeing it.
|
|
|
|
|
Hi,
I saw a few question about that but couldn't find the answer so far. The problem is that several times a day my WebApplication is getting slow at the first load. It doesn't use db in the first page or anything is just a default welcome page. www.supercontrole.com
I thought that IIS could be "re-compiling" the webapplication more often than I actually update it. Any ideas of how could I check if it is happening and how to avoid it?
Thanks,
Dirso
|
|
|
|
|
its difficult to point the problem. i used to have such problems and they eventually went away. I want hosting on a paid domain. Maybe they upgraded their servers or something else because i only monitored the site and never touched the code. but maybe in your case is different.
I see your site is quite a basic site , but you have some third party controls there , maybe you should find out if there is anyone experiencing the same problem with the controls.
that is my prediction
Hope you find a solution
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi Dirso,
this issue your facing might well have to do with the automatic recycling of the worker process
(i.e. the process thats running your application is restarted and thusly also recompiles).
The following link has some information on a couple of parameters you can check out to resolve this:
Configuring the ASP.NET Worker Process through the 'machine.config' file
Hope this helps.
Addition:
If a worker process is recycled this should be logged in the event logs,
more specifically in the system event log:
Event Type: Information
Event Source: W3SVC
Event Category: None
Event ID: XXXXX
Date: XXXXXX
Time: XX:XX:XX
User: N/A
Computer: YOUR.SERVER.NAME
Cheers
Manfred
|
|
|
|
|
I want to ignore a TextBox Control from getting focus() while pressing TAB key.
I know there's no property Tabstop for TextBox control in asp.net. I want to know how to do it in JavaScript.
Regards
Asif Rehman
|
|
|
|
|
Asif Rehman wrote: I know there's no property Tabstop for TextBox control in asp.net
Yes there is no property for this.
Asif Rehman wrote: I want to know how to do it in JavaScript.
There is no need for this.
Set the TabIndex property of the textbox as -1 .Now while pressing the tab, focus wont come on the textbox.
|
|
|
|
|
Have a look on this
http://bytes.com/topic/c-sharp/answers/275037-disable-tab-key
You don't want to move a focus to specific control?
For some reason, you don't want to some control receive a focus. That could be a case if, for example you have an invisible text box or some search text box on top of the web page, but you want to allow tab functionality only to few main controls on the web form. Simply set TabIndex property of server control, or tabindex attribute of HTML control to -1. When you run web page and hit tab key, controls with TabIndex = -1 will never get a focus. Although, user can click into this control with a mouse and set focus on that way.
|
|
|
|
|
Hi,
I am having two windows. One is showmodaldialog and other is window.open.
I want to raise both the windows at a time.
Wnen i give window.open for the two windows it gets open simultaniously. But it won't when we use showmodaldialog and window.open.
But my requirement is to open one window with showmodaldialog and other with window.open.
Can any one help us.
|
|
|
|
|
|
window.showModalDialog() is a blocking call, i.e., the code after the line that opens the modal dialog executes only after the dialog is closed.
|
|
|
|
|
That sounds like some really bad UI design. The purpose of a modal dialog is to force a user to interact with only what is in the dialog. Why would you open another window if they should only be interacting with the dialog?
Those operations can't happen "simultaneouly" because there is no method in JavaScript that does both things in one statement. One is going to happen before the other even if there is only a few nanoseconds between the calls. Why don't you just switch the order of the calls?
|
|
|
|
|
Hi
i need my application to have user based theme change like in orkut,i used theme and skin to get the functionality , it changes background color as i defined in stylesheet but when i come to control styles and colors how to change gridview skin id and other control skin id programatically against theme.
when user changes theme then it should change all other controls styles.
how to acheive this ?.
|
|
|
|