|
My Results page take 30 seconds or so to query records and render the page to the browser.
On the Results page you can click on a Detail link to view the details of a record. Clicking the browser back button from the Detail page causes the Result page to re query the data. How can I tell it to use the browser cache to display the Result page again instead of having to requery?
|
|
|
|
|
One easy method would be to store the data in session (this will work for a data table or data set) then bind it to the grid. Check to see if the data exists in page load and bind it. Then you don't have to requery the data.
Normally, I would think the back button would cause the page to reload. But I guess it is.
I didn't get any requirements for the signature
|
|
|
|
|
In some cases 10,000 or more records will be in the result. If I use a session variable to store the result datatable would that be potential resource hug on the webserver?
|
|
|
|
|
That depends.
If you have a master page and or base page then when any page other than the detail loads, you can clear session to make sure it is gone in the page load in only one place.
If you do not have a master page or a base page then removing the item from session might be a bit tricky.
If you have 1-5 users at a time you should be OK.
How much you can store in session depends on your IIS settings, hardware and number of users. You can have multiple aspnet worker process and the amount of ram each process can use is configurable.
One easy check would be to open the task manager and go to the processes tab (show from all users) check the w3wp.exe process(es) and see how much ram they are consuming.
I didn't get any requirements for the signature
|
|
|
|
|
Thanks, I will try your suggestions.
|
|
|
|
|
Did you try page level caching
|
|
|
|
|
Hi,
I have written the following function in external JScript.js file.
function validateParameter(textBoxId)
{
var paramname = document.getElementById(textBoxId);
alert(paramname);
}
<asp:button id="btnSaveCom" onclick="btnSaveCom_Click" runat="server" xmlns:asp="#unknown">
Text="Save Comments"
OnClientClick="javascript: return validateParameter('<%=txtParam.ClientID %>');">
But during the runtime it showing the alert message as null.
How to pass the input parameter to the function which in external javascript file.
Tnks in advance!
|
|
|
|
|
Can you try adding the javascript in your code behind? OnPageLoad do
btnSaveCom.attributes.add("onclick", return validateParameter('" + txtParam.ClientID + "');");
If you need to. You can create a second javascript method right in your aspx page.
for example
callValidator(clientId)
{
var paramname = document.getElementById(clientId);
validateParameterWithParamInsteadOfId(paramname);
}
I didn't get any requirements for the signature
|
|
|
|
|
As Todd suggests use code behind
btnSaveCom.OnClientClick = string.Format("validateParameter('{0}')", txtParam.ClientID);
led mike
|
|
|
|
|
use
btnSaveCom.Attributes.Add("OnClick","javascript:return xx('" + btnxx.ClientID + "');");
in the code area.
But you cant alert the parname as its an object. write
alert(paramname).value instead.
Abhishek Sur
|
|
|
|
|
Hi, I know how to make whole site in Secured HTTP (https). but I want to know how I can have only one page as https:// and all other pages of that site is in http:// ????
Like, in any shopping site, all product display pages should be in http:// which is faster but payment gatway page must be in https:// which ensures security.
please help.
Thanks for any help.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
I don't know if you can do that. Just make a separate web. Any information you need passed between the to can be put in the database or sent via query string. If you do find out how to do this I would be interested in the solution.
I didn't get any requirements for the signature
|
|
|
|
|
Just add a certificate to the whole site. Your links should be http:// links normally. When the user enters the checkout process, just switch to using https:// links...thats all there is to it. You buy SSL certificates for a domain...not really a site. Once its set up for a site on that domain, all you have to do to switch between SSL and non-SSL is change the protocol of your links. You will probably also want to set up some logic in your site to prevent access of secured pages by http.
This article should help: Switch Between HTTP and HTTPS Automatically[^]
|
|
|
|
|
Hello..i have a check box on my content page i want to access this in aspx.cs page..
Thanks..
|
|
|
|
|
buy a book on ASP.NET and follow the examples. Even if I explained this to you in depth, you're going to get stuck again if you don't understand the fundamentals and lose a lot of time waiting for answers here that you can understand.
The checkbox has a name property, you access it by it's name.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks..in my content page i have table in which i have added checkboxes dynamically..i have used page.findcontrol and form.fincontrol and this.fincontrol but not able to find a check boxes..
Thanks..
|
|
|
|
|
When you add controls dynamically, their viewstate is not restored unless you add them before page load, because it's just before page load that viewstate is restored.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi.
In a web form I have 2 user controls.
In one of them I have some textBoxes, and in other one By clicking a button in webform, I need to read the Text property of TextBox of first usercontrol.
But, by clicking the button, the text property is empty. It seems that by PostBacking the webform, usercontrols reLoaded and the stste of them not saved
Best wishes
|
|
|
|
|
When do you check the value ? Does your code ever set the value ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yeah! After entering the value in the TextBox, and hitting button
Best wishes
|
|
|
|
|
Gosh, do you believe that you answered my questions ? Where in your code do you check it, and does your code ever set an initial value anywhere ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Sorry! the TextBox is not knly.
I create it an some other controls (I don't know how many, it depends to user request) are created dynamically in code and add to a table control. by clicking the button I iterate throw rows in table, but the the table is without row, but before click it had.
2 userControls, first one is in second one and there is a button in second one, and the second one is in a web page.
Thank you for your attention
Best wishes
|
|
|
|
|
Hi, recently I've been updating my website on my computer and then I copy the pages that I've updated and place them on the server but then I'll have to request these pages from the browser the first time coz it would be slow the first time coz they are not precompiled.
So, I was thinking of precompiling these pages only and not the whole website.
I don't want to precompile the whole website coz the web.config file and the app_data folders on my computer are different from those on the server. So, how exactly can I do that?
modified on Wednesday, January 21, 2009 6:39 AM
|
|
|
|
|
you can't do it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|