|
I tried Html encoding, and having same problem.
I tried with simple \n in the input string:
function DisPlayMsg()
{
var outputstr
outputstr = "<%= Server.HTMLEncode(Response.BinaryWrite(Request.BinaryRead(Request.TotalBytes))) %>"
alert(outputstr)
}
And after server process:
function DisPlayMsg()
{
var outputstr
outputstr = "abcd
efgh"
alert(outputstr)
}
Ann obviously it is erroring out.
|
|
|
|
|
Ok, the Server is VBScript and the ClientSide is javascript
so, you need to replace Chr(13) with "\r" and Chr(10) with "\n" VB wonnt encode these characters
Giving you:
function DisPlayMsg()
{
var outputstr
outputstr = "abcd\r\nefgh"
alert(outputstr)
}
Its a been a while since I have used ASP, but I dont get while you are calling Response.BinaryWrite. The response is the output of the ASP page which I gather is the above code, so I don't see why your calling Response.BinaryWrite?
EDIT
I see why you are calling BinaryWrite, your first post does not use the <%=%> method of writing out the value. try converting the BinaryRead output to a string and running a replace on it.
James
James Simpson
Web Developer
imebgo@hotmail.com
P S - This is what part of the alphabet would look like if Q and R were eliminated Mitch Hedberg
modified on Thursday, May 8, 2008 10:42 AM
|
|
|
|
|
James Simpson wrote: Its a been a while since I have used ASP, but I dont get while you are calling Response.BinaryWrite. The response is the output of the ASP page which I gather is the above code, so I don't see why your calling Response.BinaryWrite?
Hello,
I am kind of new to ASP. so I was trying to different ways to extract string.
I tried the replace, but same result(error).
<%Dim Binary11<br />
Binary11 = Request.BinaryRead(Request.TotalBytes)<br />
Dim I, S<br />
For I = 1 To LenB(Binary11)<br />
S = S & Chr(AscB(MidB(Binary11, I, 1)))<br />
Next<br />
<br />
Replace S,"\r",Chr(13)<br />
Replace S,"\n",Chr(10)<br />
%><br />
<br />
outputstr = "<%= Server.HTMLEncode(S) %>"
|
|
|
|
|
Try:
S = Replace(S,Chr(13),"\r")
S = Replace(S,Chr(10),"\n")
I think you need to assign the return value of replace, and the parameters are the other way around (maybe??)
James
James Simpson
Web Developer
imebgo@hotmail.com
P S - This is what part of the alphabet would look like if Q and R were eliminated Mitch Hedberg
|
|
|
|
|
Thanks James. Your replacement suggestion is working good. Only thing I have to solve now is handling '\' literal. If I have '\' in my string, it is missing when I assign it from server vbscript to cleint javascript. I tried replacing \ with \\, but no use.
|
|
|
|
|
HI
Is there any way we can hide the status bar of IE 7 programatically in javascript or in code behnind file of ASP.NET, not by setting the browsers setting manually from internet options in browsers, kindly reply ASAP, thankx in advance.
|
|
|
|
|
|
Dear web-programers:
i'm new in the code project site. I have been looking like crazy a script to upload images and add it to a form in my site.
The site I'm creating is for artists to sell their crafts online. I'm using the yahoo site builder to create the complete site.
I need this html/java script code to be added to a form. The script must be simple and to add an item / upload the image to the form. I will also like to have the option in the script that the image can be thumbnailed/enlarged. Once the form is completed and submitted by the artit, I need this image to appear and be re-directed in an specific page in the site.
So, I also need the script to have the option to be changeable by me. This way I can write in each form the artist gallery pages to re-direct the images to their galleries.
Maybe is an old fashion way to do it, but I need it to be simple for the moment. Maybe in the future I will go to an asp.net and a more dinamic way.
Please, help me! Or tell me where I can find this script.
Thanks, MaryG
|
|
|
|
|
<input type="file /> will let you upload any file. How you process it on the server, is up to you.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
I love seeing the same posts here and on MSDN.
Like I said on MSDN, you need to do your own work, that is why they pay you.
Also, what does this have to do with web development ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Greetings,
Currently I'am working on a webpage
I want a treeview on a webpage with a context menu.
Is this possible; if yes, please provide me with a code example.
Thanks for every suggestion.
Peter
modified on Saturday, May 10, 2008 5:02 AM
|
|
|
|
|
It seems like your requirement is very much similar to an ASP Menu control. With Framework 2.0 it comes as a built in control.
If you want tree view itself then you have to create a div that appears on mouseover of each tree node and dissappears on mouseout.
|
|
|
|
|
hai all,
sorry to post this question here.i dont find a special forum for this ...thats why i am posting this ques here.I am new to DNN .. while creating report module i am getting this error.
Error: UserReports is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Unable to cast object of type 'ASP.desktopmodules_userreports_viewuserreports_ascx' to type 'DotNetNuke.Entities.Modules.PortalModuleBase'. ---> System.InvalidCastException: Unable to cast object of type 'ASP.desktopmodules_userreports_viewuserreports_ascx' to type 'DotNetNuke.Entities.Modules.PortalModuleBase'. at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---
with Regards,
Imthiyas Ahamed.A
|
|
|
|
|
Inherit DotNetNuke.Entities.Modules.PortalModuleBase in your user control class.
Everything Is Possible!
|
|
|
|
|
Hi,
A new security feature of IE7 adds a statusbar to all dialogs in our web application, and this unfortunately ruins the layout of these dialogs. Is it possible to disable this feature, atleast for trusted applications????
I really hope someone can help.
Regards,
Thomas Lykke Petersen (MCP)
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/ms537184(VS.85).aspx[^]
Window Restrictions - (FEATURE_WINDOW_RESTRICTIONS)- This control forces pop-up windows to remain in the viewable desktop area, display a status bar, and not draw their borders outside the viewable area of the screen. It ensures that browser windows cannot overlay important information in their parent windows, or in system dialogs. If enabled, windows may be restricted, depending on the URL Action for the page.
led mike
|
|
|
|
|
Is there any way we can hide the status bar of IE 7 programatically in javascript or in code behnind file of ASP.NET, not by setting the browsers setting manually from internet options in browsers, kindly reply ASAP, thankx in advance.
|
|
|
|
|
King Shez wrote: Is there any way we can hide the status bar of IE 7 programatically in javascript or in code behnind file of ASP.NET
in code behind? Are you kidding me? And no, javascript in the browser does not have access to the Registry. That would be a giant security hole now wouldn't it?
led mike
|
|
|
|
|
I am well aware of the fact that it is a new "security feature" but is there any possible way to disable it?
Regards,
Thomas Lykke Petersen (MCP)
|
|
|
|
|
Hi dear friends!
I am using accordion and of course accordion panes from Ajax control toolkit. in the content tag of AccordionPanes I have a swf file to show, every thing is ok! and the files are shown as I collapse each AccordionPane but when I collapse an accordion and the swf file starts, if I collapse another one the last swf does not stop( of course it is not visible but it's going on). do you have any suggestion?
this is the related part of my code:
<cc1:Accordion ID="Accordion1" runat="Server" style="direction:rtl"
SelectedIndex="-1"
AutoSize="None"
FadeTransitions="false"
TransitionDuration="250"
FramesPerSecond="40"
RequireOpenedPane="false"
SuppressHeaderPostbacks="true" Width="630px" >
<Panes>
<cc1:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="ContentStyle" HeaderCssClass="">
<Header>
<asp:Image ID="Image1" runat="server" style="vertical-align:middle" ImageUrl="filmicon.jpg" Width="40px" Height="40px" />
<asp:Label ID="Label1" runat="server" Font-Names="Tahoma" Font-Size="Small" Text="how to share"></asp:Label>
</Header>
<Content>
<embed width="620" height="495" type="text/html" src="sharing2_demo_skin.swf"></embed>
</Content>
</cc1:AccordionPane>
.
.
.
</Panes>
</cc1:Accordion>
|
|
|
|
|
By definition, this means you're using ASP.NET AJAX, and therefore ASP.NET. This means this is the wrong forum for this question.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Experts,
I am not able access server side controls in ajaxmethod.
I have TextBox control with TextBox1 as control id on the page, and a AjaxMethod called ServerSideCall(). In this method i get an exception when try to access TextBox1.Text property. It says TextBox1 is null.
Could you give me a sample code how to access server side controls using AjaxMethod.
Thanks & Regards,
Vijay
|
|
|
|
|
Is this using ASP.NET, and you're in the wrong forum ?
Your server side controls, exist on the server, not on the client. On the client, their names are different, and so are their properties. TextBox1.Text is a server side concept.
However, it's hard to say more without seeing code to understand what you're talking about
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi..
I'm Using Asp.Net with C#..
I want to Generate HTML Reports in C# with XML Data..
This is my XML Data(xml_Data.xml)
<Page_Details>
<Log Page="show_Page.aspx" Time="07:05:07:32636" Type="Master" ID="1" />
<Log Page="show_Page.aspx" Time="08:10:20:32636" Type="Master" ID="2" />
<Log Page="show_Page.aspx" Time="09:15:20:32636" Type="Master" ID="1"/>
<Log Page="show_Page.aspx" Time="05:20:45:32636" Type="Master" ID="3"/>
</Page_Details>
Please give me the Suggestions in doing this..
Thank You..
|
|
|
|