|
Hi,
I have an ASP.NET 4.0 application where I am trying to make ASP.NET sessionId cookie as HTTPOnly. My web server has IIS7.
I got the below solution from internet which did not work for me:
<httpCookies httpOnlyCookies="true" requireSSL="true"/>
I viewed cookies using Firebug where I observed that none of the cookies are HTTPOnly but they are secure.
Any solution to make ASP.NET_SessionId cookie as HTTPOnly.
|
|
|
|
|
|
Hi guys,
I have 2 repeater controls in the same page, i have to maintain the scroll position for the both repeater control on page auto post back.
I am using java script but it work for 1 repeater control even though i called for both not the other
<script type="text/javascript">
window.onload = function () {
var strCook = document.cookie;
if (strCook.indexOf("!~") != 0) {
var intS = strCook.indexOf("!~");
var intE = strCook.indexOf("~!");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("dvGridview").scrollTop = strPos;
}
}
function SetDivPosition() {
var intY = document.getElementById("dvGridview").scrollTop;
document.cookie = "yPos=!~" + intY + "~!";
}
</script>
Thanks and regards
Vishwa
|
|
|
|
|
VishwaKL wrote: document.getElementById("dvGridview").scrollTop = strPos;
I see call to only one. Where is both? Set scroll position for both control.
|
|
|
|
|
How to get Max value of (Col1,Col2,Col3) in SQL Server 2008
|
|
|
|
|
|
Hello folks,
I have a simple .aspx page. I wish I could attach the picture here.
I want to show the data either in Chart control or Gridview control. When the user selects an option to see the data either in chart control or grid view control, that specific control has to show up and other control has to become invisible.
So far, I am able to populate data succcessfully in the chart control. If the user chooses "Grid view" option, how can I show the data in grid view control in the same location. I don't want the gridview control to be shown in a pop up window or any other window.
any suggestions please
|
|
|
|
|
I have a list box with multiple values. I need a functionality to move items up/down using Ctrl+uparrow/Ctrl+downarrow. I am here by stuck with a issue when the selected item in the listbox is out of focus the scrollbars do not move correspondingly and the selected item is out of visibility.Any help is greatly appreciated.Thanks in advance.
Demo
|
|
|
|
|
I develop demo website in asp.net 2010 with webpart but it will not drag and drop into another webpart in google chrome, firefox and opera
|
|
|
|
|
This is a well-known issue with WebParts. It was fixed in the "ASP.NET Futures CTP (July 2007 release)", but for some reason the fix was never added to the framework. The CTP is no longer available, and you wouldn't want to use it in a .NET 4 project anyway.
The problem was reported to Microsoft[^], but they closed it as "won't fix" because it was too complicated to implement.
There's an old blog-post by Sebastian Rodriguez from 2009[^] which describes a potential workaround using jQuery, which you might be able to adapt to your requirements.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi I want that when i take the mouse over the menu, I dont want to show submenu.the submenu should only be display on clicking the parent item?
|
|
|
|
|
*** Script ***
$(document).ready(function () {
$(".content_head").click(function () {
$(".content_body").hide(100);
$(this).next(".content_body").slideToggle("slow");
});
});
***Style***
.content_head
{
width: 150px;
background-color: #CCCCCC;
cursor: pointer;
}
.content_body
{
display: none;
width: 150px;
background-color: #E9D9BA;
}
***Panel**
<asp:panel id="Panel1" class="content_head" runat="server" width="130px"
="" backimageurl="~/Image/header-1.png">
Management
<asp:panel id="Panel2" class="content_body" runat="server" width="130px">
<asp:hyperlink id="HyperLink1" runat="server" navigateurl="~/PartStatus.aspx">Online Parts Status
<asp:hyperlink id="HyperLink7" runat="server"
="" navigateurl="~/Partcomplaintdetails.aspx">Part Complaint Details
|
|
|
|
|
thanks for solution but i am using :
<asp:Menu ID="MoveMenu" runat="server" StaticDisplayLevels="1" Orientation="Horizontal"
StaticEnableDefaultPopOutImage="false" renderingmode="List"
Width="100%" OnMenuItemClick="MoveMenu_Click">
<DynamicHoverStyle BackColor="#6597F0" ForeColor="White" Font-Bold="True" />
<DynamicMenuStyle Width="80px" BackColor="AliceBlue" />
<Items>
<asp:MenuItem ImageUrl='http://localhost:11755/ServerFiles/ApplicationFiles/Icons/Button/gmailMove.png'>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
Please Help !
|
|
|
|
|
I want autorun a function (ex: send mail every day,...) in my web ASP.NET but dont use Windows Service. Server Asp allway auto. Please help me!
Thank you read!
|
|
|
|
|
ngoanrazor wrote: I want autorun a function (ex: send mail every day,...) in my web ASP.NET but dont use Windows Service You can write a simple console application which send the mail. Schedule this application using Windows scheduler.
Best wishes,
Navaneeth
|
|
|
|
|
Thank you reply!
I dont want use Windows scheduler. Is it possible when use ASP to autorun?
|
|
|
|
|
Sir;
ASP.NET works under IIS which is a web server that recieve http requests and send http reponses but it can't run periodic tasks.
Help people,so poeple can help you.
|
|
|
|
|
ngoanrazor wrote: Is it possible when use ASP to autorun? You could hack it up. But it won't be stable and not recommended for a production system.
To do that, start a thread which loops on an infinite loop.
while(true)
{
Thread.Sleep(someTime);
} This will work but when IIS recycles the ASP.NET process, it will kill this thread. Like I said before, this is not stable.
Best wishes,
Navaneeth
|
|
|
|
|
thank you
|
|
|
|
|
Well there is a technique using cache object expiration where you can get
a function of your own to run, search on google for:
asp.net cache scheduled task
and you can find working code.
Good luck.
/jc
|
|
|
|
|
Thank you, I will try
|
|
|
|
|
Application_Error exists in Global.asax.
Most of the unhandled exception are caught here.
While testing, I changed the name of a stored procedure to something that doesn't exist in the database.
Now the control does not come to Application_Error.
When I debug the app, the debugger shows exception when ExecuteReader is called.
I do not have any try...catch
I believe all exceptions must be caught by Application_Error.
But it does not behave so.
|
|
|
|
|
Can you share few information?
1. What code is present in your Application_Error? If you remove everything in it and place debugger, does it hit the method?
2. IIS7? CustomError mode in Web.config?
3. Are other methods of Global.asax getting triggered, like Session_start?
4. Is there any other .config file in your application?
|
|
|
|
|
My Application_Error contains 3 lines - Server.GetLastError , Server.Transfer and Server.ClearError .
I tried removing all these lines and simply put a return statement on a breakpoint, but it did not hit.
My development environment is IIS 5.1, Windows XP, Visual Studio 2010.
I tried both with customError mode="Off" and customError mode="On" with the same results.
Session_Start is being called in Global.asax and I checked it by placing a breakpoint.
I only have a web.config file.
I created another sample file and tried it with the same results.
I have shared the sample for you if you have the time.
https://docs.google.com/file/d/0BwxeXZOAvlxJa3AxMUIxVkVUSEk/edit?usp=sharing[^]
You can download it by selecting File -> Download.
Since I'm not a web developer, my current solution is to place a try...catch and then redirect to the error page from the catch handler.
This works for me.
Any help would be appreciated.
Thanks for your time.
|
|
|
|
|
Hi Santosh,
I downloaded it and opened in my VS2010 as a website. Set the break points in Global.sax. Built and ran.
Guess what? It hit the Application_Error method.
Am I missing something or you are?
Please re-run the application that you shared with me with breakpoints and see again.
|
|
|
|