Tag Archives: Button Id

How to upload files to server using the new FileUpload control in C#/C-Sharp ?

By | June 6, 2012

Hi, For uploading files to server using the new FileUpload control in C#, [c] <%@ Page Language="C#"%> <script runat="server"> protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) try { FileUpload1.SaveAs("C:\\Uploads\\" + FileUpload1.FileName); Label1.Text = "File name: " + FileUpload1.PostedFile.FileName + "<br>" + FileUpload1.PostedFile.ContentLength + " kb<br>" + "Content type: " + FileUpload1.PostedFile.ContentType; } catch (Exception ex) {… Read More »

Uploading Files to Server in C#/C-Sharp

By | June 6, 2012

Hi, For uploading files to server in C#/C Sharp, [c] <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="UploadFile" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:FileUpload ID="Uploader" runat="server" Height="24px" Width="472px" />&nbsp; <asp:Button ID="cmdUpload" runat="server" Height="24px" OnClick="cmdUpload_Click" Text="Upload" Width="88px" /><br /> <br /> <asp:Label ID="lblInfo" runat="server" EnableViewState="False"… Read More »

jQuery Hide & Show Toggle – An Example

By | April 28, 2011

Hi, Want to try out a simple hide and show toggle using jQuery? The example given below shows how you can simply hide and show a paragraph in html using jQuery. Try it out! [html] &lt;html&gt; &lt;head&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(document).ready(function(){ $(&quot;#hideMe&quot;).click(function(){ $(&quot;p&quot;).hide(); }); $(&quot;#showMe&quot;).click(function(){ $(&quot;p&quot;).show(); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;Coderz Heaven! Click ‘HideMe’ for… Read More »

jQuery Hide & Show Toggle – An Example

By | April 28, 2011

Hi, Want to try out a simple hide and show toggle using jQuery? The example given below shows how you can simply hide and show a paragraph in html using jQuery. Try it out! [html] &lt;html&gt; &lt;head&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(document).ready(function(){ $(&quot;#hideMe&quot;).click(function(){ $(&quot;p&quot;).hide(); }); $(&quot;#showMe&quot;).click(function(){ $(&quot;p&quot;).show(); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;Coderz Heaven! Click ‘HideMe’ for… Read More »

jQuery Hide & Show Toggle – An Example

By | April 28, 2011

Hi, Want to try out a simple hide and show toggle using jQuery? The example given below shows how you can simply hide and show a paragraph in html using jQuery. Try it out! [html] &lt;html&gt; &lt;head&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(document).ready(function(){ $(&quot;#hideMe&quot;).click(function(){ $(&quot;p&quot;).hide(); }); $(&quot;#showMe&quot;).click(function(){ $(&quot;p&quot;).show(); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;Coderz Heaven! Click ‘HideMe’ for… Read More »

How do you call an actionscript function from a html page and viceversa. How to you access the actionscript variable function from an HTML page in actionscript.

By | December 26, 2010

The following code helps you to do this. Save the following  code as am .mxml file [xml] <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> <![CDATA[ private var calledFromJSHandlerFunction:Function = calledFromJSHandler; private function init():void{ html.addEventListener(Event.HTML_DOM_INITIALIZE, domInitialized); html.location = "start.html"; } private function domInitialized(event:Event):void{ html.htmlLoader.window.calledFromJSHandlerFunction = calledFromJSHandlerFunction; } private function calledFromJSHandler():void { mx.controls.Alert.show("ActionScript called from JavaScript", "Alert"); } private… Read More »