Hi, please put how to get file size using javascript without using any third party controls?
Sudhanshu Mani Tripathi
Posts
-
How to get file size without using ActiveX -
Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown when downloading the file form sharepoint document libraryHi, I am using copy service(copy.asmx) to download the files from sharepoint document library. In sharepoint server, I have created a doument library and this library contain serveral folders , i have to downlaod the files from document library folder but when i call the GetItem() method of copy service then throw exception SoapServerException . I am using following code to download the file. // sharepoint is a web reference that points to http://sharepoint/\_vti\_bin/copy Copy myCopyService = new Copy(); myCopyService.Url = url + "/_vti_bin/copy.asmx"; myCopyService.PreAuthenticate = true; myCopyService.Credentials = new System.Net.NetworkCredential("Administrator", "Path1234", "e1srv245"); // URL to the file you want to downlaod string copySource = url + "/PaymentAttachment/105/"+ fileName; //HtmlAnchor anchor = new HtmlAnchor(); //anchor.Target = "_blank"; //anchor.HRef = copySource; // Define the variables that will store the output from the web service call FieldInformation myFieldInfo = new FieldInformation(); FieldInformation[] myFieldInfoArray = { myFieldInfo }; byte[] myByteArray; // Call the web service uint myGetUint = myCopyService.GetItem(copySource, out myFieldInfoArray, out myByteArray); // Convert into Base64 String string base64String; base64String = Convert.ToBase64String(myByteArray, 0, myByteArray.Length); // Convert to binary array byte[] binaryData = Convert.FromBase64String(base64String); // Create a temporary file to write the text of the form to string tempFileName = Path.GetTempPath() + "\\" + myFieldInfoArray[0].Value; // Write the file to temp folder FileStream fs = new FileStream(tempFileName, FileMode.CreateNew, FileAccess.ReadWrite); fs.Write(binaryData, 0, binaryData.Length); fs.Close(); I am not identifying, what i am missing?
-
Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer issueI have changed only ProtectionKeyFilename in entlib.config section like this I am not analyzed that what changes i have to do? can u pz tell me what other more chages i will have to make in my application.
modified on Friday, August 27, 2010 1:56 AM
-
Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer issueI have a application that is running live , I want to run the application on my local system so that some changes can be made. I am attempting to use the Enterprise Library Cryptography block to encrypt a credit password in my ASP.NET 3.5 application. Everything is configured correctly,and not getting any error when I build he application but When I call the DecryptSymmetric () method, I get this error: The system configuration source is not defined in the configuration file. [System.Configuration.ConfigurationErrorsException] = {"The system configuration source is not defined in the configuration file."} Stack trace: at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceFactory.Create() at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.DecryptSymmetric(String symmetricInstance, Byte[] ciphertext) at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.DecryptSymmetric(String symmetricInstance, String ciphertextBase64) at UserControls_LoginUserControl.SetUserAthent My web.config contains the following (relevant) sections:
pz let me know What is the solution of the above issue. I am searching it on google from last 4-5 hrs but did not get any solution , please let me know if any body have any other finding or anything I have missed .
-
How to rewrite the url ?Hi Abhijit I studied the above url that u have sent but i am not getting any changes in url when implement. Actually i want if incoming url is http://localhost:53365/UrlRewrite/City.aspx?Id=1" then it convert into http://localhost:53365/UrlRewrite/City.aspx/Noida where noida is cityname that depends on querysring value. please help me.
-
How to rewrite the url ?I want to rewrite the url based on query string in asp.net with c#. it means if url comes http://app.tasktrek.in/Citylist.aspx?Id=1 then it should be look like http://app.tasktrek.in/Citylist.aspx/Noida in url where Id=1 for noida , Also have any solution in which I do not want to confiure IIS? How to do it in asp.net .
-
How to play flv file in asp.net application -
how to create rounded corner div with drop shadow.HI, I am new for jquery and using last couple of days.I have no idea that how to use jquery UI and css class .ui-widget-shadow. please let me know how to use it.
-
how to create rounded corner div with drop shadow.Hi , l am using jquery and jquery.corner pluging to create div rounded with border. i get it, but my problem is that i want to use drop shadow on bottom and right side of div . i am searching it last couple of days but no getting it. i also have used liquid canvas but did not find correct solutions Please suggest How to do it?
-
Insert record in Identity field of table using CommandBuilderI have two datatable named lik dtSource(from Source Database) and dtDestination(from Destination database), I have to insert all record of dtSoruce in dtDestination using CommandBuilder. I am generation the query using commandbuilder daDestination.InsertCommand = commandBuilder.GetInsertCommand(); daDestination.Update(dtDestination); the above line of code insert all record successfully in destination table, But my proble is that i want to insert record in Identity field of destiantion table from dtSoruce. I am using sqlbulkcopy but it also not do. what is the process of inserting recording in identity field using commandbuilder???????????
-
Authorize.net SIM implementation issueI am trying to incorporate Authorize.net SIM implementain with my asp.net website. I want to use relay respone so that customer can check transaction status. i have included the following code for relay response in Receipt.aspx.cs page I am writing following code to get transaction informaion string ResponseReasonText = Request.Form["x_response_reason_text"]; My problem is that when i click the submit button in gatewaty page after enter credit card information then each time i get the following error. An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card. This transaction has been approved. It is advisable for you to contact the merchant to verify that you will receive the product or service I did not found what i am going to mistake. Please if any one have complete code in c# or getting any error in my code please reply me.
-
Diff between IspostBack and IsCallbackWhat is IsCallback? when to use Callback? Pz explain with example ?
-
Problem with Remember passwordI am using cookies to remember userid and password .It works fine. I am using ImageButton Conrol instead of simple button. my problem is that when i click image button, remembered password is going to blank (IE) In mozilla it not happened but first time button click event is not fired when i click second time then button event fire.(it means we have to click image button two times )
-
string Encryption and decryption problemI am using below code to encrypt and decrypt querystring value .it works fine but it show nullrefrence exception when some works not performed in mysite for more than 15-20 minute. it shows savedKey and savedIV must be non-null." error I am not analyzing why this error occur . private static byte[] savedKey = null; private static byte[] savedIV = null; public static byte[] key { get { return savedKey; } set { savedKey = value; } } public static byte[] IV { get { return savedIV; } set { savedIV = value; } } private static void rdGenerateSecretKey(RijndaelManaged rdProvider) { if (savedKey == null) { rdProvider.KeySize = 256; rdProvider.GenerateKey(); savedKey = rdProvider.Key; } } private static void rdGenerateSecreInitVector(RijndaelManaged rdProvider) { if (savedIV == null) { rdProvider.GenerateIV(); savedIV = rdProvider.IV; } } public static string Encrypt(string originalStr) { Random RandNum = new Random(); int RandomNumber = RandNum.Next(1000000, 9999999); originalStr = String.Format("{0}&Random={1}", originalStr, RandomNumber.ToString()); //encode data string to be stored in memory byte[] originalStrAsBytes = Encoding.ASCII.GetBytes(originalStr); byte[] originalBytes = { }; // create memory stream to contain output. using (MemoryStream memStream = new MemoryStream(originalStrAsBytes.Length)) { using (RijndaelManaged rijndel = new RijndaelManaged()) { // generate secret ket and save in to vector. rdGenerateSecretKey(rijndel); rdGenerateSecreInitVector(rijndel); if (savedKey == null || savedIV == null) { throw (new NullReferenceException("savedKey and savedIV must be non-null.")); } // Create Encrypt and Stream Objects. using (ICryptoTransform rdTransform=rijndel.CreateEncryptor((byte[]) savedKey.Clone(),(byte[]) savedIV.Clone())) {
-
Menu tab not woriking In safariI am creating menu tab using multiview . it works fine in firefox and IE but in safari browser menu tab not clicked
-
Street View not working in IE [modified]i am using street view map and pass the src in Iframe it works fine in firefox ,In IE7 when page load then it work but after reload the page nothing appears inside the iframe content(it means street view map does not display). my code is like this-- ;
modified on Tuesday, December 1, 2009 3:46 AM
-
TextChanged Event of a textbox does not do an ajax postBack [modified]I have a textbox inside an AJAX updatepanel. The textbox has autopostback set to true and the textchanged event declared. When I come into the page, I pre-load the textbox with a value. If I change the value and either tab or click away, the event is fired, however, the textbox.text value has my OLD value not the new value I have just entered. My Code is like this <asp:UpdatePanel Id="Upd1" runat="server"> <ContentTemplate> <table> <tr> <td> <asp:TextBox ID="txtUser" runat="server" AutoPostBack="true" OnTextChanged="txtUser_TextChanged"> </asp:TextBox> </td> <td> <asp:TextBox ID="txtPwd" runat="server"> </asp:TextBox> </td> </tr> </ContentTemplate> </UpdatePanel>
modified on Thursday, October 8, 2009 11:48 AM
-
How to display Xml file on web browser [modified]I have an xml file with name Text.xml http://www.man.com/ram 9/30/2009 12:00:00 AM Weekly 0.69 I want to display xml file in client webbrowser without open dialog box. it means without asking download option but i am not able to do this.
modified on Wednesday, September 30, 2009 4:56 AM
-
JqueryI am new For Jquery ,I want to use jquery in VS2005 but I am not doing. I write a code to display hello on button click but nothing is happen after button click. I think I did not get reference of query.js file. How to use???????????? <script type="text/javascript"> $(document).ready(function() { $("#Button1").click(function() { alert("Hello world!"); }); });
-
testing dllIs there any tool to test dll file I have used in my .net application?