|
Hello,
I have a site which has auctions (antiques). My products page takes three query parameters. Two of them ranges from ~1-10 and one from 1-40 and increasing (the auction id). Most users will only view the current auction so this one I would like to cache. Auctions which recently was active and auctions that are coming up will be visited a bit as well, but not nearly as much as the active one. Older auctions won't be visited much.
Right now I am caching my datasets which I retreive from my database. I only cache the active and some of the more frequently used ones.
The products never change really, so I could use output caching, but would this be a bad choice with so many query parameters? I guess that output caching is better then to cache the datasets as you don't have to render the html every time. Should I use a very short duration so that the output caching doesn't cache so many pages, or maybe remove less-frequently viewed pages from the output cache immediatly from the code-behind? Maybe sliding expire?
Any thoughts? Thanks
|
|
|
|
|
Hi to all,
I want to call my custom edit form while editing mode of web part.
Can you help me out?
|
|
|
|
|
krinaljariwala wrote: want to call my custom edit form while editing mode of web part.
it's not clear to me ? do you want to call your user control in web parts ? please confirm.
cheers,
Abhijit
|
|
|
|
|
Yes i want to call user control to my webpart. In 'declarative catalog part' there is need to drag the control to catalog part. So i want to make user control which contains entry form. So tell me how can i do this?
|
|
|
|
|
When you declare an object "static", will it be shared among different users of different machines? I couldn't test it cuz I'm testing from a single machine. I put a static variable in a common code and every time I visit a page, it shows the (user-specific) static data no matter how many refresh you make. that's fine. But will the same data be shown to any other users accessing the same page? "Static" has that much of scope??.
Thanks for your reply.
|
|
|
|
|
Yes, that is what static means. You have one server, one application instance, and static variables will be shared across it.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
It starts its life from page_load and ends its life until page_unload.
studing is processing in this life.
|
|
|
|
|
hi all,
iam stuck on this that how i able to merge cells of table . each row of table contains 32 cells and i wants to merge cells from cell number 4 to 8 .
How i assign the columnspan property to merge these cells .
how i do this.
iam using table server control and created table dynamically .
please give me any hint or suggestion . any article which would be hepful.
Regards
Thanks in advance
Rameez
|
|
|
|
|
Where is the data coming from? Is this using a data bound control ? If you're just building a table, why do you need a server control ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Thanks for fast reply,
Data is coming from database i have created table dynamically and wants to merge cells .
i mean iam getting start_cell_number and end_cell_number from database columns and stored in array.and after stroing the array i have created loop of 32 cells of one row like this.
Dim myarray(32)as integer
for i = start_cell_number to end_cell_number
myarray(i)=1
Next
for d as integer =0 to 31
dim tc as tablcell = new tablecell
if testarray(d)=1
tc.backcolor= color.green
else
tc.backclor= color.yellow
endif
tc.text =" "
trow.cells.add(tc)
table1.row.add(trow)
now i have to merge cells from start_cell_number to end_cell_number ?
tc.columnspan="?" ?
give me hint ?
regards
Rameez
|
|
|
|
|
hi,
i have a grat problem, when i print on crustal repport, the page will be refrech, there are a methode for stoping this refrech?? thank you very mutch.
|
|
|
|
|
I assume that the print operation includes a postback to get data. If it's refreshing, it's because it needs to.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
there are not a methode to stop refrech??
|
|
|
|
|
By a book on ASP.NET so you can understand what it is, and how it works.
Why would it do a refresh, if it didn't need to ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
i would save a string who was obtain with a post of an other page, so when i refresh i lose my variable, how i can stock variable on page?? thank you
|
|
|
|
|
use hidden controls or viswstate or session!
studing is processing in this life.
|
|
|
|
|
This page refresh meaning it have posted to server.You just this button of print run at client,not server,just validation controls using-occur in client.
studing is processing in this life.
|
|
|
|
|
i use following code to create a folder (.net 1.1)
if ( Directory.Exists(Server.MapPath("~/temp") +"/"+ SID) )
{
lbl_event.Text=ss;
Directory.Delete( Server.MapPath("~/temp") +"/"+ SID, true );
}
Directory.CreateDirectory(Server.MapPath("~/temp") +"/"+ SID );
and following error appear "Could not find a part of the path "D:\"."
you can see the error with its details http://kmrt.ir/Welcome.aspx[^]
it is not for permission!
anyone know how could i solve it?!!
please help me
|
|
|
|
|
Nafiseh Salmani wrote: Server.MapPath("~/temp") +"/"+ SID
What kind of system are you using? That would work on a *nix system, as that uses "/" as file path separator, but it would not work on a Windows system, as that uses "\" as file path separator.
You should use the Path.Combine method to form the path, that way it will work regardlesss of what file path separator the system uses:
Path.Combine(Server.MapPath("~/temp"), SID)
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
i checked
Server.MapPath("~/temp") +"/"+ SID . it works .
just when i use
Directory.Delete or
Directory.CreateDirectory it takes Error.
i set the permission also!
How could I solve it?
|
|
|
|
|
Nafiseh Salmani wrote: i checked
Server.MapPath("~/temp") +"/"+ SID
. it works .
In what sense do you mean that it works?
If you are using it as a path in a Windows system, it's not correct. It might work eventhough in some situations, but fail in others.
Nafiseh Salmani wrote: How could I solve it?
Eh? I already told you. Gave you the code for it and everything.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Did you consider using the debugger to see what the path is it's trying to write to ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I cant use it! because it happen when i upload it not at localhost
|
|
|
|
|
Then write a page which works out the path and writes it to the page, so you can see what you're dealing with.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
You had better debug it,or create a new file to debug filepath validation.Certainly,you also use following:
Directory.Delete(Server.MapPath(@"./temp")+"//"+sid,true);
or
Directory.Delete(Server.MapPath(".//temp")+"//"+sid,true);
Ple notice "/" in limit!
studing is processing in this life.
|
|
|
|