|
|
Hi there
I am in urgent need to know how to disable page level caching in a user control.
Please provide asp.net 2.0 specific solution.
|
|
|
|
|
these code may help u
to remove page from cache. these code r write into Page Load event
if (Session["username"] == null)<br />
{<br />
Response.Redirect("login.aspx");<br />
}<br />
<br />
<br />
Response.Buffer = true;<br />
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);<br />
Response.Expires = -1500;<br />
Response.CacheControl = "no-cache";
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Thanx Deepak
But I was looking for page directive to disable caching.
|
|
|
|
|
Page.Response.Cache.SetCacheability(HttpCacheability.NoCache) ?
you should explain what behaviour you would like to achieve...
Pilo
|
|
|
|
|
|
I implemented ASP.NET 2.0 Client callback script (ICallbackEventHandler) to
get the result back from server without postback the page. Problem is when
session expires or authentication times out.
If I click on any button which performs postback on page, everything is fine
and I'm getting forwarded to login page, but when I click on the button which
implemented client callback script on and then a postback button, the error
happens.
Everybody can help me.
Thanks.
-- modified at 1:37 Thursday 16th November, 2006
|
|
|
|
|
Hi all,
Please anybody tell me the connectionstring for mysql.
Thanks & Regards
Mishra
|
|
|
|
|
This Page[^] will hep you out
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
Hi,
I am building up a string in vb.net, and then want to display it in a javascript confirm box. If the user confirm, then the function should go on, otherwise it should exit.
How would I proceed. This is what I have thus far.
<br />
msg = "The Centre has Item(s) attached to it." & vbCrLf & "Are You sure you want to delete this Centre?" <br />
msg = msg.Replace(vbCrLf, "\n")<br />
msg = "<script language=javascript>return confirm(""" & msg & """)</script>"<br />
msg = msg<br />
Dim sb As New StringBuilder()<br />
sb = New StringBuilder()<br />
sb.Append(msg)<br />
<br />
'not sure how to proceed from here <br />
If msg = MsgBoxResult.Yes Then<br />
'code here<br />
else<br />
'code here<br />
end if
|
|
|
|
|
in the page load add this code
myButton.Attributes.Add("onclick", "return confirm_delete();")
and write in the aspx page
function confirm_delete()
{
if (confirm("Are you sure you want to delete this ... ?")==true)
return true;
else
return false;
}
hope this would help
Best Regards
3ala2
|
|
|
|
|
Ok, I can include the function, but how do I set the true/false that the javascript returns to a variable in the code behind. Depending what the user selects, I continuw with the code behind function.
|
|
|
|
|
It can't be done that way.
At least not without a TARDIS[^].
The page that you create will be sent to the browser, and the execution on the server ends. When the page is loaded in the browser, the Javascript will be run and the user get to reply to the confirm box. The result of the choise can not travel back in time and be used in the code that created the page before it was sent to the browser.
If you want to use the value in server side code, you have to send the value back to the server and use it when the next page is created.
---
b { font-weight: normal; }
|
|
|
|
|
I understand what you meant by your post. Will have to do with a normal client side confirm box.
Thanks
|
|
|
|
|
Can anybody tell me "cache" is browser memory,or server memory or both?
I have idea about server side cache, what about browser cache?
Thanks&Regards
Srilakshmi
|
|
|
|
|
Cookies is the only type of clientside caching. ViewState seems used at clientside but actually it traverse during callback between clintside and serverside.
Neeraj
|
|
|
|
|
Neeraj Arora wrote: Cookies is the only type of clientside caching.
It's not at all the only type of client side caching. The usual form of client side caching is caching of requested files.
Furthermore, cookies are not cached at all. They are stored at client side, and it's the only place that they are stored.
---
b { font-weight: normal; }
|
|
|
|
|
srilu nagalla wrote: Can anybody tell me "cache" is browser memory,or server memory or both?
Both and neither. There are many ways of caching.
A file can be cached in the browser. The browser will then use the cached copy instead of requesting a new one from the server. This is especially useful for images. Files can be cached in memory or on disk.
A page can be cached on the server, so that when someone requests the page, the code to create it doesn't always have to run.
A file can be cached between the server and the browser, for example in a router.
The server can use caching for other things than pages. You can for example cache a commonly used object so that you don't always have to fetch it from some slower media, like a database.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for this information. I was really unaware of these concepts but buddy the problem was written here for browser cache.
Neeraj
|
|
|
|
|
Hello
I'm building my own Website which contains a discussion forum.. Do u guys have any reference or source code for a 'Forum' based on ASP.NET (VB) and SQL Server Database?
Thx
|
|
|
|
|
why build one when you you can download and use one for free.
Try Telligent Community server, http://www.communityserver.com/ it's easy to set up and it quite customizable.
"a fool will not learn from a wise man, but a wise man will learn from a fool"
"It is hard to fail, but it is worse never to have tried to succeed." - Theodore Roosevelt
"Success is going from failure to failure without losing your enthusiasm." - Winston Churchill
My Website || My Blog
|
|
|
|
|
Hi Guys,
I want to move the wizard control sidebar to top. Since sidebar buttons can be shown horizentally i can show those buttons in a row. I want to move that on top instead on the side? Please help. I know control adapter can help but i don't know how to write control adapter for wizard control. If someone has written that then please share the code with me.
none
|
|
|
|
|
Hi ,
How can I access the file system on a remote server? The site is running on local web server. When I add a new client through the managment site (the local site), I need to create a folder for the new client on the production site (the remote server), and copy some files into the new created folder, so that the client will have his own folder on the production site.
I am using .NET 2.0. Is it possible to do it? Any help would be very appreciated!
Thanks!
|
|
|
|
|
There is good property in datalist; RepeatColumns
Is there any think like this makes a repeater repeate item tempaltes, like putting 3 in a row.
I do this a bit ugly way using condition for "ItemIndex"
----------------------------
| item 1 | item 2 | item 3 |
----------------------------
| item 4 | item 5 | item 6 |
----------------------------
| item 7 | item 8 | item 9 |
----------------------------
.
.
.
<br />
...<br />
<ItemTemplate><br />
<%# (int.Parse(DataBinder.Eval(Container, "ItemIndex").ToString())%3==0)?"<tr>":""%> <br />
<td><%# Eval("caption") %></td> <br />
<%# (int.Parse(DataBinder.Eval(Container, "ItemIndex").ToString())%3==2)?"</tr>":""%> <br />
</ItemTemplate>
karanba
|
|
|
|
|
Hello,
I am creating a custom control which uses TextBoxes and Required field validator. I am using INamingContainer in my custom control.
When I use the control in a page I get an error:
"The ControlToValidate property of 'rfvEmail' cannot be blank. "
I have no idea why I am getting this error. It is like I did not referenced the rfvEmail.ControlToValidate. But I did.
I tried everything I could think off but had no luck.
Could somebody help me out?
Here is my code:
Public Class MyControl
Inherits WebControl
Implements INamingContainer
Private WithEvents tbEmail As New WebControls.TextBox
Private WithEvents rfvEmail As New WebControls.RequiredFieldValidator
Private Sub tbEmail_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbEmail.Init
tbEmail.Width = Unit.Pixel(200)
End Sub
Private Sub rfvEmail_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles rfvEmail.Init
.ControlToValidate = tbEmail.ID ' ???????? ERROR ?????????
.Display = ValidatorDisplay.Dynamic
.ErrorMessage = "Required Field"
End Sub
Protected Overrides Sub CreateChildControls()
MyBase.Controls.Add(tbEmail)
MyBase.Controls.Add(rfvEmail)
MyBase.CreateChildControls()
Me.ChildControlsCreated = True
End Sub
End Class
Thank You Very Much,
Miguel
|
|
|
|