How to write data to a file in client side using javascript or someother client side scripting language.
Hi,
I would like to know how to write a data to a client side file using javascript or someother client side scripting language. The file type expected is ini file. txt file would also be appreciable.
Thanks in advance.
If the site is a trusted and you are running IE then you could try http://www.w3schools.com/asp/asp_ref_filesystem.asp The Old Sewing FactoryThat twitter nonsense.
You can write to the server, but not to the client's machine. Being able to do so would be a huge security breach.When you ask a question, remember to click "mark as answered"...
change menu's property Target in client-side (javascript)
Hi all !
I need to be able to change the target of my menu (regular asp.net control) in client-side using javascript. Does anyone have a clue or tip?
Thanks a lot !We are here to learn, and teach whenever possible...
Since every server side control renders finally as HTML, you must be able to access each HTML element rendered using javascript and do any changes but, I did not understand what Menu target means. other than that you can view source to see how the Menu control is rendered and use js to modify any part thereof. Thanks,RavikanthPlease "Mark as Answer&q...
How to restore label's text across postbacks when it is changed by client-side script?
Hello all,I have a page that uses AJAX to check info entered in textboxes and display results by changing the text of labels underneath the textboxes. Since label's value/text is not submitted by the form, I use hidden fields (that are updated together with the labels) to restore the text of labels across postbacks. The question is: is there any nicer way of doing that? Maybe I should use some other control, instead of labels, the value of which is submitted?Thank you.
It depends on what your ajax call is doing. If it's a webservice call, or any of the ajax framework...
How to use client-side script(javascript) in DNA using .Net Remoting
Hi all,
It was known that SAO and Singleton object about .Net Remoting. When I Create an object in server side and hosting in IIS's virtual directory,I want to use javascript asynchronous invoking the remote object by HTTP channel, 80 port and SOAP formatter just like XMLHTTP invoking web service. My code as following,
<script>
objXmlDoc = new ActiveXObject("Msxml2.DOMDocument");
objHttp = new ActiveXObject("Msxml2.XMLHTTP");
strEnvelope = ??
objHttp.onreadystatechange = function()
{
......
}
szUrl = "http://ServerNa...
Is it possible to redirect client's browser from the client side?
What I'm getting at is this. My server doesn't have access to certain websites. But my client's browsing my site will have access from the computers they're using. Can my programming logic somehow open up a restricted access site by routing the command to the client's browser and then out on to the web? Or is the best I can do simply putting a hyperlink up that the user can click on? Thanks for any help.
To perform any action on the client you will need to consider using a client-side language such as Javascript. You would then be able to do something like document.location('url to re...
When to use client side varidation and server side varidation in .net?
In .net or classic web application we can varidate user data either on client isde or server side. How to select which side varidate to be used? Thanks!
Generally, I use both client and server validation. I make sure the input is in the correct format and reasonably valid on the client, then I verify the data on the server. The extent of validation also depends on the type of data that I need to validate.Here are a few references:Validating ASP.NET Server ControlsIntroduction to Validating User Input in Web FormsClient-Side Validation for ASP.NET Server ControlsSecurity Checklist...
Modifications in client side can't be detected in server side.
Hi,
I have 2 HTML controls in my page, that run at server, Drop Down List (Copy From), List Box (Copy To), and 1 ASPX button,
On the page load i populate the DDL, from database, 3 item added for example.
At the end of HTML page, a java script code call a JS function, that function get all items of DDL and remove the selected item, and place the other 2 items in list box, so if i have A, B, C in DDL, and A Selected, the script only place B, and C in the list box.
The population of DDL performed in the server side, the population of list box performed in the client side by java scrip...
Can't combine client-side & server-side
I have aspx file (with master page). I need to activate cilent-side vb script function (which is in the aspx) that gets remote IP address and resolve it's hostname.
but I'm not able to send the IP' this is my code:
<td>document.write(GetHostNameFromIP(<%Request.ServerVariables("REMOTE_ADDR")%>)))</td>
can someone tell me what's wrong ?
Seems you should write something like: <td><script type="text/vbscript">document.write(GetHostNameFromIP(<%= Request.ServerVariables("REMOTE_ADDR") %>)))</script>...
can clear server side text box value from client side.?
Hi,
function Disab()
{ if(document.all.chkSPTariff.checked)
{
document.all.txtVFX.disabled=false document.all.txtVHSFO.disabled=false
}
else
{
document.all.txtVFX.disabled=true document.all.txtVFX.value=""
}
This is how i am clearing the text for <asp:TextBox>. Ofter i submit, i wonder to see the old value from serverside , like txtTemp.Text is h...
Can you call a c# on the server side from javascript functions on client side
Hello guys
This is something intresting I have come across during development.
I have a javascript written in a .JS file , to my knowledge the .js files are executed on the server side.
But security concerns with java script that these .js files can be access by connecting to port 80 of the server .
So an ultimate alternative reminas to call c# code from a java script function.
Can anyone Help me on this matter
Regards
Nihar
Hi Nihar,
Usually .js files executed on client side. Please explain your configuration.Leon LangleybenMCSD, ASP.NET MVPBlog...
How to change txt2.text when the txt1's.text changes using JavaScript?
Hello! I want some JavaScript (or any other client-side) solution for my problem thatdescribed here: http://forums.asp.net/p/1382766/2930267.aspx In a few words, my problem is that i don't know the way to change the txt2.text valuewhen the txt1.text value changes... Please read the http://forums.asp.net/p/1382766/2930267.aspx first...I want only JavaScript solution... Thank you very much!
Like this?
<input type="text" id="TextBox1" name="TextBox1" onchange="textBox1OnChange(this);" runat="server" /><input type...
Change a label backcolor using client-side javascripting
I'm working on a small project where I need to either change the backcolor of a label or change the image on the page. The user will have a list of colors in a dropdown to pick from. I've tried many variations of the code below and nothing seems to have any effect on the label backcolor.
Here's what I have:
<script type="text/javascript">function Color(elem)
{var indx = elem.selectedIndex;
var lbl = document.getElementById('<%= label1.ClientID %>');if(indx == null) alert('d_Color not found!');
else {if(indx == 1)
lbl.backColor = ...
How to use client-side script(javascript) in .Net Remoting
Hi all,
It was known that SAO and Singleton object about .Net Remoting. When I Create an object in server side and hosting in IIS's virtual directory,I want to use javascript asynchronous invoking the remote object by HTTP channel, 80 port and SOAP formatter just like XMLHTTP invoking web service. My code as following,
<script>
objXmlDoc = new ActiveXObject("Msxml2.DOMDocument");
objHttp = new ActiveXObject("Msxml2.XMLHTTP");
strEnvelope = ??
objHttp.onreadystatechange = function()
{
......
}
szUrl = &...
downloading .NET dll's to client side
hi!
does anyone knows how can I download .NET assembly to the client side using the <Object> tag with vesioning?
I tried using :
<OBJECT id="MyUserControl" style="WIDTH: 1000px; HEIGHT:800px" codeBase="MyUserControl.dll#1,0,0,0" classID="MyUserControl.dll#MyNamespace.MyClass"> </OBJECT>
but my MyUserControl.dll assembly is dependent on several other .net dll which should be download indirectly as well.
It works fine.
The problem arises when I advance the MyUserControl.dll AssemblyVersion (and his dependent dll a...