|
i have control which takes tto much time to load
so i want to put tht page into cache. but accordint to different userid
my first page is user login,after login user will get same page but diffent data . so i want to put tht page in to cache, how i will do tht??
put same page in cache but according to diiferent loginid
|
|
|
|
|
Keep it in the Cache object with user id as key and reload from there for subsequent requests.
|
|
|
|
|
can u plase give me the code....i didnt get u
n where to write tht code??
|
|
|
|
|
You said you have a control which takes time to load. So put only the items required to fill that control in cache and not the whole page. Follow these steps
1 - Check cache has data
2 - If not, get the data from database (or somewhere), fill the cache and populate your control
2 - If cache has data, get the data from cache and populate control.
Check this[^] article and read about Cache arbitrary objects in server memory
If your data load is fast and your control is taking time to render the data, you can keep the rendered HTML of that control in cache and reuse it.
|
|
|
|
|
my page has 3 diff controls....n i want to catch whole page
|
|
|
|
|
Hi all...
Im dynamically adding data to a label which is placed in a panel. but the problem is that as the label fills up
the panel length increases leading to scrollbars.
I want the scrollbar to be to be pointing at the end of the panel.
Here is the code sample
<asp:Panel ID="Panel1" runat="server" BackColor="White" BorderColor="CornflowerBlue"
BorderStyle="Solid" BorderWidth="1px" Height="250px" ScrollBars="Auto" Width="100%" CssClass="filter">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label3" runat="server" BackColor="White"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSendMsg" />
<asp:AsyncPostBackTrigger ControlID="Timer1" />
</Triggers>
</asp:UpdatePanel>
</asp:Panel>
Bye
|
|
|
|
|
Hi Sam,
I tried working on the sample and it is working fine.
I meand the scroll bar is at the end (right end) of the panel.
You can try with div tag instead of panel:
<div style="overflow:auto; width:auto; height:250px; border-color:CornflowerBlue; border-width:medium; border-style:solid;">
Sudhanva.
modified on Thursday, January 8, 2009 12:12 AM
|
|
|
|
|
how to use dialogArguments of showModalDialog in asp.net control
|
|
|
|
|
Hi I have created ASP.Net website on F drive lets say
F:\MyProject
and its solution file is in
C:\Documents and Settings\PRASHANT\My Documents\Visual Studio 2005\Projects\MyProject\MyProject.sln
now i have copied my code folder and sln to another PC and i tried to run sln file then i got error message like
F:\MyProject is not installed
so how can i reslve this issue.
Thanks & Regards,
Prashant B. Lavate
Software Engineer
Mobile : +919423872257
Pune(India)
|
|
|
|
|
Could it possibly have something to do with F:\MyProject not being a valid path?
Open the sln file in notepad and look at the paths.
only two letters away from being an asset
|
|
|
|
|
Remove that project from solution and re-add it. Always try to keep solution in the same directory where your files are placed to avoid such kind of problems.
|
|
|
|
|
I am creating an image of text, having each letter in different color. i have to place each letter near by the previous letter using the pointer.
For that purpose i need to know the size of the previous letter.
How to know the width of the letter used?
|
|
|
|
|
Take a look at the MeasureString method.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Mr Guffa,
thanks for your kind reply. actually the thing here is i am creating an image, i have to check the size of the letter may be in pixel format so that after its width i have to point the next letter.
Hope you get my requirement.
|
|
|
|
|
Yes, I understand your requirement. Read my previous post again.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi All,
Can some guru tell me how can I debug an ASP.net web application in Visual Studio.NET 2003? I inserted a breakpoint in the page load code and hit F10, but the application opens teh web form in the browser rather than goes into the code to execute step by step.
I am using Windows XP pro, IE8.0 Beta, and IIS 5.1
Thanks heaps.
|
|
|
|
|
|
|
AndieDu wrote: I am using Windows XP pro, IE8.0 Beta, and IIS 5.1
From where are your trying to debug ? Is it from Local IDE or your application hosted on IIS and you want to debug from there ?
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Congrats Dude for recognised as MVP.Keep it up Man
Cheers!!
Brij
|
|
|
|
|
Thanks Brij !!!
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Thanks, i was trying to debug from local IDE.
|
|
|
|
|
In what mode you are running your application
1. Debug
2. Release
if it is in release mode then you cannot debug it.
Secondly, try checking web.config compilation option
|
|
|
|
|
Thanks dude,
I already worked out myself. For some unknow reason, i have to attached the debug process after load my asp.net web application, then i can debug into the .net 2003 codes.
i am happy to offer any help regarding this issue if anyone wants, just shoot me an email.
|
|
|
|
|
I have a gridview that I am trying to validate 2 fields so that one is not greater than the other. When I run the code, I get the following error.
Server Error in '/WebSite' Application.
--------------------------------------------------------------------------------
Control 'inStock' referenced by the ControlToCompare property of 'CompareValidator2' cannot be validated.
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.Web.HttpException: Control 'inStock' referenced by the ControlToCompare property of 'CompareValidator2' cannot be validated.
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:
[HttpException (0x80004005): Control 'inStock' referenced by the ControlToCompare property of 'CompareValidator2' cannot be validated.]
System.Web.UI.WebControls.BaseValidator.CheckControlValidationProperty(String name, String propertyName) +1840513
System.Web.UI.WebControls.CompareValidator.ControlPropertiesValid() +1735335
System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +33
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
I believe the problem is in my asp code and not my c# code. Here is my asp code for that section.
<asp:templatefield headertext="Ordered Amount" xmlns:asp="#unknown">
<itemtemplate>
<asp:textbox id="amount" runat="server" width="30px" />
<asp:comparevalidator id="CompareValidator1" runat="server" errormessage="Must be a number">
Operator="DataTypeCheck" Type="Integer" ControlToValidate="amount"></asp:comparevalidator>
<asp:comparevalidator id="CompareValidator2" runat="server" errormessage="Amount ordered is greater than amount in stock">
Operator="LessThan" ControlToValidate="amount" ControlToCompare = "inStock"></asp:comparevalidator>
</itemtemplate>
<headertemplate>
Ordered Amount
</headertemplate>
</asp:templatefield>
<asp:templatefield xmlns:asp="#unknown">
<itemtemplate>
<asp:label id="inStock" runat="server" visible="false" />
</itemtemplate>
<headertemplate>
</headertemplate>
</asp:templatefield>
|
|
|
|