|
Hi,
Can you tell me how do u close the dialog page?
If you are using window.close() method in javascript to close the window then modify the javascript as following.
window.opener.location.reload();
window.close();
the first line will reload the the window from where u have open the dialog page.
I hope this will help you.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
just do like from the child page.
function exitChildWin() {
window.opener.reload();
window.close();
}
just call the exitChildWin javascript function from the child page.
tbhattacharjee
|
|
|
|
|
We are looking for some assistance to get all aspects of our web application working on the web server.
Just to give a brief overview, we have created an application which allows people to sign up to use our general classifieds section. Upon clicking the submit button, the application inserts the record into the appropriate table in our MSSQL database, creates a new sub-folder for the user, using their username, and the creates two more sub-folders (one to store images and one to store PDF files) under the Username's folder.
The registered user can search the classified listings and the results pane shows a small thumbnail and decription. The user can click on the thumbnail to view more details. The problem we are experiencing is the display of the thumbnail and image.
Prior to this we had problems in uploading the image to the server in the following function:
private void SaveImages()
{
if (Session["UserType"].Equals("Customer"))
{
if (FileUpload1.FileName != "")
/* {
ResizeImage(300, 300, FileUpload1.PostedFile.FileName, Server.MapPath("~\\Customer\\" + Session["username"].ToString() + "\\Classifieds_Images\\") + FileUpload1.FileName);
ResizeImage(300, 300, FileUpload1.PostedFile.FileName, Server.MapPath("~\\" + "AllClassifiedsImgs\\") + FileUpload1.FileName);
} */ {
File.Copy(FileUpload1.PostedFile.FileName, Server.MapPath("~\\Customer\\" + Session["username"].ToString() + "\\Classified_Images\\") + FileUpload1.FileName, true);
}
if (FileUpload2.FileName != "")
{
File.Copy(FileUpload2.PostedFile.FileName, Server.MapPath("~\\Customer\\" + Session["username"].ToString() + "\\PDF_Files\\") + FileUpload2.FileName, true);
}
}
else if (Session["UserType"].Equals("Shopper"))
{
if (FileUpload1.FileName != "")
/* {
ResizeImage(300, 300, FileUpload1.PostedFile.FileName, Server.MapPath("~\\PWC_Shoppers\\" + Session["username"].ToString() + "\\Classifieds_Images\\") + FileUpload1.FileName);
ResizeImage(300, 300, FileUpload1.PostedFile.FileName, Server.MapPath("~\\" + "AllClassifiedsImgs\\") + FileUpload1.FileName);
} */ {
File.Copy(FileUpload1.PostedFile.FileName, Server.MapPath("~\\PWC_Shoppers\\" + Session["username"].ToString() + "\\Classifieds_Images\\") + FileUpload1.FileName, true);
}
if (FileUpload2.FileName != "")
{
File.Copy(FileUpload2.PostedFile.FileName, Server.MapPath("~\\PWC_Shoppers\\" + Session["username"].ToString() + "\\PDF_Files\\") + FileUpload2.FileName, true);
}
}
}
We commented out the portion of code which called the Resize function and just opted to use the File.Copy line (hopefully you can follow this above) and got around the image uploading issue.
The problem we have now is that when the results are displayed, the thumbnails and images are displayed as small red x's indicative that the filepath/filename is either invalid or the image is not present.
When the developer tests this same application on his computer, the application works as it should. When I copied the exact same folders/files to my own local computer to see if the fact we have our web applications located on the F drive (not the C drive) was the reason however I get the same problems with the display of the images.
I suspect it is a configuration issue or a setting held in the ASPX/ASPX.CS files where it is looking for files or directories or paths which are present on the development environment but not on the server but this is only a guess.
I am late in getting this application released for general use and as a result losing a lot of credibility rapidly. If anyone can help us to solve this issue, I would be eternally grateful.
Please ask any questions you wish as I may not have explained the problem clearly enough.
Kind regards
Lesley
Lesley
Popweb City
|
|
|
|
|
Have you tried doing a response.write to render the path it's looking for, to see if it's what you expect ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am not one of the programming team - just the system architect but did think about this before as maybe being something useful to do.
Are you able to provide me a sample of code I could paste into an aspx page so I could test to see what is being returned?
Cheers and thanks
Lesley
Popweb City
|
|
|
|
|
Wow - my definition of a system architect would not include the word 'just'.
Response.Write("The file path is ~\\Customer\\" + Session["username"].ToString() + "\\Classifieds_Images\\") + FileUpload1.FileName);
Should do it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Christian
this is the response:
The file path is ~\Customer\lesleyag\Classifieds_Images\
How do I find out what the tilde is referencing? I have a gut feeling that this is where the problem may be occuring but would like to find out for sure although in saying this, this line of code does upload files to the correct place:
{
File.Copy(FileUpload1.PostedFile.FileName, Server.MapPath("~\\PWC_Shoppers\\" + Session["username"].ToString() + "\\Classifieds_Images\\") + FileUpload1.FileName, true);
}
so potentially this is correct.
The major issue I am having is that the images are not being displayed on another page. It is this page which works on the development machine but not the web server
Lesley
Popweb City
|
|
|
|
|
What is the URL you're going to ? I suspect the problem is that you have a name in the string on one end, i.e. your devs are using localhost/customer/xxx and the users are using www.mysite.com/subsite/customer/xxx
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Okay, the URL is www.popwebcity.com/in - just for now, login as lesleyag and password is abc - it is only a test case so not a big issue as I will alter the password later on.
If you click on Show Classifieds and then SHOW ALL, you will see the small red crosses where there are images. In the web.config file, we reference the actual IP address not (localhost)
But when I created a website (virtual folder)on my local machine, which does reference http://localhost/in/showclassifieds.aspx the same thing happens in the image display which makes me think there is some other setting I am not seeing.
Lesley
Popweb City
|
|
|
|
|
OK, I think you need 'in' at the top of your path.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have just looked through the code which is not displaying the images and after piecing it together, my programmer has created a separate folder for all the images so the original is stored in the user's folder and a copy is stored in another folder called \AllClassifieds which is not a silly thing to do.
In the table, where the Classified Ads are located, he stores the filename and then in the select statement, selects the field called AdImagePath which is effect is the filename and I think he reads this into a data source. In the display page, he uses this bit of code:
" title="Click here to see details">
Should the src be referencing the sub-folder as "src='/AllClassifiedsImgs/<%#Eval("AdImagePath")%>' rather than just "src=AllClassifiedsImgs/......'
because I really cannot see anything else in the code which looks out of place (not that my coding knowledge these days is superb or expert!
Cheers again
Lesley
Lesley
Popweb City
|
|
|
|
|
Yeah, that definately makes a difference.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
iam using Dataset.ReadXml method , to Load Dataset and it has got 1 table,
the xml file has 10 rows, so the Dataset.Table["table1"] has 10 rows.
table colums,
Name , Age , Street , RelationShip
1 22 xxx Spouse
2 33 yyy NameInsured
3 23 ddd Mom
4 22 ggg Mom
5 99 kkk sister
when i bind the dataset to the grid i will get the view like the above list
now, i want (2nd) NameInsured , Record is always to be the 1st row in my grid.
please suggest.
Sriram
|
|
|
|
|
Then you need to reorder the data before you databind. Or, remove the row, if you mean you don't want it to appear at all.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
no i cannot reorder the datasource,
is there any thing can be done, in datatable like sort ,Filter.
i tryed both but,no use. or is there any thing in Gridview control ?
Plz suggest...
|
|
|
|
|
You can't modify an XML file ?
This[^] should help - you CAN sort it, and I suspect you can write a function object that specifies a sort that isn't really a sort ( because it doesn't sort, it jsut moves the first column down )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
do like this:
Find the index where U have the record "NameInsured".
Using that swap the records(0 and index) using
grid.Rows[index].Cells[0],Cells[1],etc.
Regards,
Arun Kumar.A
|
|
|
|
|
hello coders!
im a bit of a newbie when it comes to web design, so hold on tight and bare with me!
i am developing a personal site using the free Portfolio starter kit from the MS Expression site
all working fine and dandy, but im trying to add the "lightbox" java script to the main project image.
on the lightbox site, it states that you activate the lightbox by adding
image #1
to a link tab, but the image has no link!
the current image code is as follows:-
<asp:image "="" id="FullSizeImage" runat="server" imageurl="<%# Eval("fullSizeImage") %>">
my site can be viewed at www.krisathi.co.uk
any help would be awesome
Cheers
|
|
|
|
|
sorry, code didnt come out!
you can activate the light box by adding:-
a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1
the current image code is as follows:-
div class="details_thumb_lg_frame">
div class="details_thumb_lg">
asp:Image " ID="FullSizeImage" runat="server" ImageUrl='<%# Eval("fullSizeImage") %>'>
|
|
|
|
|
Kris100 wrote: a href="images/image-1.jpg" rel="lightbox"
This is HTML
Kris100 wrote: asp:Image " ID="FullSizeImage" runat="server" ImageUrl='<%# Eval("fullSizeImage") %>'>
This is a server control which will generate HTML
a href="<%# Eval("fullSizeImage") %>" rel="lightbox" title="my caption">image #1
Seems to me to be the solution
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi,
I wrote my custom provider for sitemappath using sqldatasource but there is a little problem at this point. first things first my page contains textbox (TextBox1), treeView (TreeView1) and Button(Button1) and if the users select a node then write something in the textbox and then press Button1, all data write database where the value of selected node in, the data can be written on the database but after postback the treeview isnt updated. i wrote Page.DataBind() but that method didnt work and wasnt still updated. if i stop temporary server in vs8 than start again tree view has been being updated. so what should i do to pass over this issue ?
Thanks and Regards..
|
|
|
|
|
|
|
so what should i do then ?
|
|
|
|
|