|
Hi, sorry, my English is wrong. In this link I explain better.
|
|
|
|
|
You have already posted this question in QA[^]. Please do not repost your question in other parts of the site; it only serves to annoy the people who would otherwise help you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
I have seen the the article Session Time Out Warning Message Using jQuery in ASP.NET[^]
1- I tried it for Master/Content pages by putting the content of the SessionInjQuery.aspx inside the Masterpage.master
<asp:ContentPlaceHolder id="head" runat="server"> and call it from the page loading event. However it didnt work.
2- I want to load the code once I make a login from my Login.aspx content page.
3- I dont want to have warning. What I need is to directly turn it to the session expired screen.
How can I adjust the code to perform the above things. I can show my files directory structure.
Thanks alot
|
|
|
|
|
If you have questions about an article, then use the discussion forum at the bottom of that article: Link[^]
The author of the article is usually the person who is most likely to be able to help you with their code.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I need to have some server-generated javascript files, so I decided to create *.aspx pages that return the application/javascript mime type. This part is working, but now I am attempting to add a route to the routing table so the client is unaware of the technology used to generate the javascript file (e.g., I want to reference a *.js file from the client, then route the request to the appropriate *.aspx page). I added the following to RouteConfig.cs:
routes.MapPageRoute("Enumerations", "Scripts/Constants/Enumerations.js",
"~/Scripts/Constants/Enumerations.aspx");
When I include the script using the *.aspx file, everything works as expected. However, when I attempt to access the *.js file, I get a 404/Not Found error. Is there a way to make the file publicly available as a *.js file?
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
The issue is that IIS sees a request for a *.js file, which isn't mapped to an ASP.NET handler, and so it doesn't invoke the ASP.NET pipeline. The routing module never gets the chance to see the request and route it to your real handler.
There seem to be three basic options to fix this:
1. runAllManagedModulesForAllRequests="true"
Modify your web.config to tell IIS to invoke the full ASP.NET pipeline on every request.
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
This will potentially have an impact on the performance of your site.
2. Remove the preCondition on the UrlRoutingModule-4.0 module.
<system.webServer>
<modules>
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
</modules>
</system.webServer>
The performance impact won't be as great as option 1, but there will still be an impact, as the routing module will now fire for every request to the site.
3. Custom handlers
Explicitly map the requests to an ASP.NET handler:
<system.webServer>
<handlers>
<add
name="dynamic-js" verb="GET,HEAD" path="scripts/*/*.js"
type="DynamicScripts.CustomScriptHandler, DynamicScripts"
preCondition="integratedMode"
/>
</handlers>
</system.webServer>
This will have better performance that the other two options. The down-side is that you have to create an IHttpHandler or IHttpHandlerFactory class to handle the requests.
You might be able to get away with using System.Web.UI.PageHandlerFactory , but I haven't tested it.
http://svenaelterman.wordpress.com/2011/01/31/using-asp-net-4-0-extension-less-routing-on-iis-7-5/[^]
http://www.hanselman.com/blog/BackToBasicsDynamicImageGenerationASPNETControllersRoutingIHttpHandlersAndRunAllManagedModulesForAllRequests.aspx[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
hi this is vinny, how to integrate silverlight in Asp.NET like as it is used in Bespoke Digital Media. What necessary tools are required for that and what DLL file are required to add this control in Visual Toolbox.
http://www.bespokedigitalmedia.in
|
|
|
|
|
how to get in project any one boy give me a answer and
I get on phone number notifications?
|
|
|
|
|
|
what? please explain . What exactly you want?
Please up vote if it helped you
Thanks And Regards
Sibeesh
|
|
|
|
|
I have CalendarExtender in asp.net gridview control:
<asp:gridview id="grvTest" runat="server" autogeneratecolumns="False" style="width: 100%;">
<asp:templatefield headertext="Calendar Date">
<itemtemplate>
<asp:textbox id="txtTestDate" runat="server" text="<%# Bind("TestDate")%>">
<asp:image id="imgCalendarTestDate" runat="server" imageurl="~/Images/Icons/calendar.png">
<ajaxtoolkit:calendarextender id="CalendarExtenderTestDate" runat="server" behaviorid="BehaviorHideTestDateControl" popupbuttonid="imgCalendarTestDate"
="" popupposition="BottomRight" targetcontrolid="txtTestDate">
---------------------------------------------------------------------
I know in the application/page BehaviorIDs are unique.
Above code follow throw error: Two components with the same id 'BehaviorHideTestDateControl' can't be added to the application.
I'm tried solution: dynamic BehaviorID (foreach row Behavior will equal row ID) but can't.
Please bring your ideas or solutions?
Thanks!
modified 30-Jul-14 21:22pm.
|
|
|
|
|
Hi all,
I am a asp.net mvc developer.
I would like to create a filter form (search) and display the results in a table. I want the page loads with the default filter. possibility to navigate from page to page without losing my Selected filters. Do this in ajax
|
|
|
|
|
medodesign essentially wrote: Write all my code for me.
You've been here 7.5 years, and you still haven't worked out that that's NOT how this site works?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
I want to upload the directory on the server.
The file upload control is uploading the file not directory.
is there a way by which I can upload the directory ?
Thanks
|
|
|
|
|
|
I have a dumb question. Are you wanting to upload all the files in the directory or somehow upload just the directory?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I think dumb question should be asked in QA
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
True. That is the place for it.
Heck, I could copy my question and paste into a new question in QA without any of the context here and it would still make more sense than most questions that come through there.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Why do you want to upload a directory instead of file? What is its significance???
If you want to upload the directory itself, it can be done using jQuery plugins. See this link
|
|
|
|
|
I think it's a limitation of the browsers capabilities.
Keep in mind that HTML elements are an agreed upon standard in which the browser will interpret the element and attempt to render it in the browsers window to the best of it's ability.
I did some reading, and Google's Chrome, the latest version supports selecting the whole folder.
Keep in mind that you can program the window that opens to select a file to or for,
File Extension Types as a filter
Single or Multiple Selection
so if the browser has the capability, you should be able to toggle that feature.
Other programs like uploadify use a combination of JavaScript and a HTTP Request to upload files, and completely bypass the file upload element. An example would be CK-Editor, in which you have to purchase or write a HTTP Handler to upload the file and write it to the server drive.
Examples:
Upload files using an HttpHandler[^]
|
|
|
|
|
If you don't mind postbacks:
1. You'll need to build a custom Javascript window that will enumerate a selected directory, most likely recursively so that you can get the sub-directories. This will replace the file upload window, so plan to code some events and hooks.
2. You'll need some metadata to send with the files to identify where they all belong.
You can also do this with AJAX but there are other considerations.
Here's a tutorial for your controller:
http://www.prideparrot.com/blog/archive/2012/8/uploading_and_returning_files#uploading_multiple_files[^]
|
|
|
|
|
How can I generate a randon 8 digit number? I have this but its not working
Dim random = New Random(System.DateTime.Now.Millisecond)
Dim randomNumber As Integer = random.[Next](1, 500000)
Dim randomNumberNew As Integer = random.[Next](1, 500000)
|
|
|
|
|
So you want an 8-digit number, but you've asked for a number between 1 and (500000 - 1) (a 6-digit number)?
Try asking for a number with 8 digits:
Dim random = New Random(System.DateTime.Now.Millisecond)
Dim randomNumber As Integer = random.[Next](10000000, 100000000)
Dim randomNumberNew As Integer = random.[Next](10000000, 100000000)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I think because my process is running to fast this line is not working:
Dim random = New Random(System.DateTime.Now.Millisecond)
|
|
|
|