|
If the Pictures folder is under the root folder of your web application than this exception will be thrown. The ../ is attempting to go above the root folder, which is not allowed.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
the pictures folder under a sub-domain. can I access it somehow else than full physical type?
|
|
|
|
|
You have to use the tilde character "~" to specify a path who start from the root of your web app.
the code will be :
fupPicSummary.PostedFile.SaveAs(Server.MapPath(@"~/Pictures/summary_" + campaign.ID + ".jpg"));
|
|
|
|
|
Hi ,
please let me know how to Get all the values from HttpContext.Current.Cache as
i doesn"t know the keyname to specify in get method of HttpContext.Current.Cache...
ie HttpContext.Current.Cache.Get
|
|
|
|
|
|
|
RaviRanjankr wrote: one OP have already answered you
OP stands for Original Poster, i.e. the person who posted the question. OP does not relate to one who answers a question.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: OP stands for Original Poster, i.e. the person who posted the question. OP does not relate to one who answers a question.
I was thinking OP stands for Other Person. that's why I used OP word. whatever,
thanks Mark to let me know the actual meaning of OP(Original Poster).
|
|
|
|
|
Hi every body
I want when user click save button the prompt show that user can save page with any extension like .htm but only save content page not master page please guide me
Thanks for your help
|
|
|
|
|
To do that you would need to create a create another page that does not use the master page or use CSS to remove the master page elements when it is displayed. Then have the user save that page. This is what most "printer friendly" pages do.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Could you explain more with some example I some confuse How can I create another page in the same time? I think your solution is correct but it's difficult too .
|
|
|
|
|
You can't create another page dynamically, which appears to be what your are thinking. You must create the page before hand, just like any other asp.net page in your application. Or you use CSS to remove the masterpage elements. This method is used extensively in SharePoint 2010.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
But It's Dynamic page and sorry How can I use css to remove masterpage?Which element in css?can you write your code its very necessary for me.Thanks
|
|
|
|
|
.hidden
{
visibility: none;
}
Elham M wrote: can you write your code
Sure. Contact me offline to discuss rates and requirements.
Elham M wrote: its very necessary for me
It is very necessary for me to get paid for my time and effort.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You can create a separate CSS file for printing and set the
media="print" attribute in the
link tag. If you hide all master page elements in this CSS file, then those elements will not be printed.
|
|
|
|
|
I've khnew this tag for print and I've used it but this tag just for print it's not for save button!
|
|
|
|
|
You can use the same technique with a little tweak. Create two CSS files and make the master page elements invisible in the second css file. Create a new page that uses this css file. You can open this new page as a popup from your original page and save from the popup.
|
|
|
|
|
You mean like what has already been suggested two days ago
Read the original question and the responses.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
yes, I did not read your response
|
|
|
|
|
This won't work for the OP. There is no printing involved, only display.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
My bad, I did not read the question properly, thanks for pointing out.
|
|
|
|
|
Hi,
I have three tables in a dbml file and two Linq queries to get the data using Linqs. The first linq query gets some data from a table and then on this same collection we apply 2nd query. Eventhough after I check for the null value on the variable I get table not found exception.
So I want to check whether the table we applied the first linq has the required table or not. I am giving the code block below.
I want to check a specific table parallelDataContext.teQUTUDatas in dbml exists in database or not?
private int? GetTeQUTUData(int quarterlyUpdateJobId, int quarterlyUpdateSubscriptionId)
{
int? tuReportBinaryDataID = null;
if ((parallelDataContext != null) && (parallelDataContext.teQUTUDatas != null))
{
return parallelDataContext.teQUTUDatas.Where(d => d.QuarterlyUpdateJobID == quarterlyUpdateJobId &&
d.QuarterlyUpdateSubscriptionID == quarterlyUpdateSubscriptionId).
Select(a => a.TUReportBinaryDataID).FirstOrDefault();
}
else
return tuReportBinaryDataID;
}
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Typically all tables should be created before using the database. Normally tables are created when the application is installed, updated or used for the first time thus a "table not found" would not occurs.
Philippe Mori
|
|
|
|
|
Actually in my case there are two different jobs that create the tables and fill the data. But when I am showing the view, I am showing all.
So when job1 runs it will not have some tables and when job2 the same it will not create some tables.
For every run all the tables will be dropped and then created and loads the data.
In that case I want to check before hand that whether the table exists or not. If it fails I want to return null or handle the situation.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Is there a reason to drop the table instead of simply deleting all rows ?
By the way if you have 2 independant jobs, there will always be a risk that the table get dropped between the time you make the check and the time you try to access the data.
Anyway, I would say that in this case (if you do drop the tables) the best solution is not to do the test the existance of the table but catch and handle the exception (you might check the error code or if the error message contains the name of the table and only handle the error if it is expected).
If the view run independly of the jobs, handling exception is a must as otherwise you will sometime have a bad timing where the table would be dropped just after you check its existance.
I think that you should avoid dropping and recreating the table as you will be able to avoid to deal with that problematic situation.
Philippe Mori
|
|
|
|