|
Jeez I did put runat="server" and id attribute in the html element. Yes I did! Lets me show you my codes again. When I debug it, i got compile error:
Server Error in '/ELMARIE Website' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Cannot create an object of type 'System.Boolean' from its string representation 'multiple' for the 'Multiple' property.
Source Error:
Line 115:
Line 116:
(Red)Line 117:<select runat="server" name="order" multiple="multiple" size="12" style="width:330px;" id="dlist1" onchange="swapImage1()">
Line 118: <optgroup label="Sow Seeds of Love">
Line 119: <option selected="selected" value="Images/NoneImage.gif">None</option>
You see I have put runat="server" and also id attribute in the html elements
Markup:
....
....
....
Code Behind:
string selectedValue = dlist1.Value;
|
|
|
|
|
No only are you rude and impatient asking for urgent help you ignore the etiquette and protocols here. How much help do you expect if you can't comply?
FORMAT YOUR CODE SNIPPETS!!!
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Ah I just found why runat="server" and id attribute were unreadable to you when I put bold on them. Thats why you guys didnt see anything. Im so stupid hehe!
When I debug it, i got compile error:
<b>Server Error in '/ELMARIE Website' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Cannot create an object of type 'System.Boolean' from its string representation 'multiple' for the 'Multiple' property.</b>
<b>Source Error:
Line 115:
Line 116:
<b>(Red)Line 117:<select runat="server" name="order" multiple="multiple" size="12" style="width:330px;" id="dlist1" onchange="swapImage1()"></b>
Line 118: <optgroup label="Sow Seeds of Love">
Line 119: <option selected="selected" value="Images/NoneImage.gif">None</option>
</b>
You see I have put runat="server" and also id attribute in the html elements
<u><b>Markup:</b></u>
<select id="dlist1" runat="server" name="order" multiple="multiple" size="12" style="width:330px;" onchange="swapImage1()">
<optgroup label="Sow Seeds of Love">
....
....
....
</optgroup>
</select>
<b><u></u>Code Behind:</b>
string selectedValue = <b>dlist1</b>.Value;
|
|
|
|
|
Change
multiple="multiple" to
multiple="true"
|
|
|
|
|
Cyberoxy wrote: Im so stupid
Yes, you are. You have been told three times now to use proper formatting.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Hey guys,
Hoping someone might be able to shed some light on a problem I am currently having.
I have a WebMethod being called by some javascript code, everything is working as it should, the WebMethod is a static string.
I am writing the output (which contains a small amount of html) to a hyperlink on my page (I'm adding a product to a basket and updating the link to the basket with item total etc.).
On my local dev machine, and on a staging version of the website (a copy of live) this all works nicely, the hyperlink shows what it is supposed to. But when put live, the WebMethod is called fine, and the output comes out in JSON format. This in itself I didn't think was a problem as I can just use jquery to parse the JSON, but it fails in firefox as being invalid JSON.
What's even weirder is that when I created a 2nd test version of the page (a carbon copy, just with the name changed), that behaves perfectly on live, without the need for JSON parrsing.
This isn't a problem in all browsers, IE, Chrome (release) and the latest Safari all pop the raw JSON in as the hyperlink text, Firefox (4) seems to parse it and shows the correct HTML.
Can anyone think why it would behave differently between 2 identical pages, where only the name is slightly different, and what the best way to parse the JSON is when it is returned from the WebMethod. Does it have to come back as JSON, I know xml is an option but really I could do with just a string..
I tried clearing all of my temporary files, so I know it's not a caching issue.
Live server (and the staging one too):
Win Server 2003
IIS6
The website is .Net 3.5, C#
Thanks in advance!
|
|
|
|
|
I get the exception : Cannot use a leading .. to exit above the top directory.
when I try to save a picture to the server, I use the line:
fupPicSummary.PostedFile.SaveAs(Server.MapPath(@"../Pictures/summary_" + campaign.ID + ".jpg"));
|
|
|
|
|
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.
|
|
|
|