.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

.js file not working

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :ASP.Net
 
I have page calling javascript. <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Java Script Test</title> <script language="javaScript" type="text/javascript" src="javaScript/TestScript.js"></script> </head> <body> <form id="form1" runat="server"> <div align="center"> <p><asp:Label ID="Label1" runat="server" Text="PayBand"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="txtpb" runat="server" onkeyup="insideJS('txtpb','txtGP','txtgross');"></asp:TextBox></p> <p><asp:Label ID="Label3" runat="server" Text="Grade Pay"></asp:Label> &nbsp;&nbsp;&nbsp; <asp:TextBox ID="txtGP" runat="server" onkeyup="insideJS('txtpb','txtGP','txtgross');"></asp:TextBox></p> <p><asp:Label ID="Label2" runat="server" Text="gross"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="txtgross" runat="serv


View Complete Post


More Related Resource Links

upload file not working

  

Hi,

iam using masterpage and ajax update panel, i have child page called  fileupload.aspx,i try to upload the file

but its not working , can i use updatepanel in child page , pls very urgent

looking forward for answer.




New off line application working with sdf file. Need advice

  

Hey Folks


I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.


Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's


Thanks

Capjlp



Code write file asp.net 2.0 is working in firefox but IE not working.

  
If Not IsDBNull(ext) Then                                        ext = LCase(ext)                                    End If                                    Select Case ext                                        'Case ".htm", ".html"                                        '    type = "text/HTML"                   

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

Task scheduler and System.IO.File.WriteAllText() not working properly

  
I have a simple console application that has this in mainline:  Console.WriteLine(System.String.Format("the current directory is: {0}", System.IO.Directory.GetCurrentDirectory())); System.IO. File.WriteAllText(@"test.txt", "new contents");   Console.ReadLine(); I compile this in VS 2010 and copy the EXE to a directory named "c:\test".  When I run this code in two different OS's via "Task Scheduler" and "Scheduled Task" I get different results.   In Windows Server 2003 R2 "Scheduled Task" this code will create a file as I would expect, c:\test\test.txt with the proper contents written to it.  When I run this same code on Windows 2008 R2 (64 bit version) "Task Scheduler" it writes the expected contents to an unexpected location, c:\C:\Windows\SysWOW64\test.txt. In both environments if I run the exe's from a command line, it writes to c:\test\test.txt as I would expect. As I understand it, if you don't fully qualify the file name in the first parameter of the WriteAllText method it will write the contents to the file in the directory of the executable however this seems to break down when running in the Windows 2008 Task Scheduler.  I know I can fully qualify the file name or put the expected path in a

<%=%> doesnt working if script is in seperate js file.

  
var a =document.getElementById("<%= TextBoxId1.ClientID %>")this code soesnt working on a seperate javascript file (ofsure linked to aspx file)but works if javascript embedded in aspxwhat if my javascript code is not in aspx ?how can I access autonamed IDs like this ? any idea ?(thank you before any anwer).

File Upload Control is not working in Update Panel

  
hi friend... i am using update panel... in one of my aspx page (ASP.NET 2.0)there is a file upload control in update panel which is used to upload company logo on server..when i remove the update panel.. than file upload is working properly..but when i again place an update panel then file upload control is not working and its giving me error.. in likeIf String.IsNullOrEmpty(fldLogo.PostedFile.FileName.ToString) Then                 as object reference not set to an instance of an object... can any body help me ?any idea ??  

File download from 3 servers not working.

  

Hi guys,

We have a problem where in the user can download files from an email. A link that will redirect to a page where the code to download the file resides. Before the download the user needs to be logged in to the system for security. The problem is that sometimes for whatever reason when the user clicks the link the download dialog box does not appear and just a blank white page. It happens only on our staging environment where we have 3 servers.. We can't reproduce this in our dev and test env. where we only have one server.

We need help.. thanks.

Below is the actual code.

  Private Sub DownloadFile()
        Dim path As String = ConfigurationManager.AppSettings("JobApplicationDocuments")
        path &= applicationClientId & "\" & jobId & "\" & jobApplicationId & "\" & fileName

        If (System.IO.File.Exists(path)) Then
            Dim fs As System.IO.FileStream = System.IO.File.OpenRead(path)
            Dim file As System.IO.FileInfo = New System.IO.FileInfo(path)
            If file.Exists Then
                Response.Clear()
                Response.AddHeader("Content-Disposition", "attachment; filename=" & orginalFileName.Replace(" ", "_"))
                Response.AddHeader("Cont

System.IO.File.Exists - Not working

  
I Hide/Show an image based on the existence or not of that image. If the image exists, then I show the image the report has to show. If the image does not exist, then I show a default image. Think of it as an eCommerce web site which shows a catalogue of products. If we do have a picture for that product, then we show the product's picture. If we do not have a picture for that product, then we show a default images that says image not available.

To achieve this, I tried to use System.IO.File.Exists("image path") in the Hidden property of the image field but it does not work.

I thought it could be the due to the location of the image but I also moved the image to my local machine where I am designing this report and it still fails.

I created a very simple console project just to see if the library works and it does, when I run the code on a console application, it perfectly works, it returns True.

I also modified rssrvpolicy.config changing all PermissionSetName to FullTrust and still nothing.

I will really appreciate any possible solution, links, ideas, comments...

Thanks in advance for your help.

Miguel Gonzalez.

property setting in report server (2008) config file is not working as expected.

  

Hi,

I have set the <WorkingSetMinimum> property to 2.4GB in my reportserver 2008 config file.

By defintion, <WorkingSetMinimum> setting means,

  1. Lower limit of service memory consumption; memory will not be released if the consumption is below this amount, though the service will not reserve the designated amount of memory when it starts.
  2. If service uses more than the designated amout of memory, it will release back the memory only till this declared value and not beyond that, which means it should keep 2.4GB as designated.

See this link for definition: http://books.google.com/books?id=mzY_Xo_9J-gC&pg=PA589&lpg=PA589&dq=What+is+%3Cworkingsetminimum%3E+in+report+server+configuration+file&source=bl&ots=r_xhRp8erj&sig=E_o0-Dh2SXOgMNrW3sptt5oZrYI&hl=en&ei=f5mjTNeNM5O8ccmErJMI&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCAQ6AEwAw#

Link to css file is two times in web page, css is not working

  

Hello,

When I am building and running a webform, the link to a css file is two times in the head.
And the css is not working, can any one help me please.
The code is:

In the view source of the webpage:

<head><title>
   Home - MKB Databasebeheer
</titel><link href="App_Themes/MKB/MKB.css" rel="stylesheet" type=""text/css" /><link
hred="App_Themes/MKB/MKB.css" type="text/css" rel="stylesheet" /><style type="text">

The code in the master page is:

 <head runat="server">
  <title>Mkb Databasebeheer</title>
  <link href="App_Themes/MKB/Mkb.css" rel="stylesheet" type="text/css" />
</head>

The code in web.config is:

<page theme="MKB" masterPageFile="~/MKBDatabasebeheer.master: maintainScrollPositionOnPostBack="true" />

I hope that it is clear to you what I have done, and what I have done wrong?

 

Greetings,
Willem


asp.net upload file not working for IPad/IPhone

  

Hi All,


Not sure if this is the correct area to ask, but its worth a try....


I have a webpage with an asp.net 2.0 upload file control, it works on Windows, but not in the IPad/IPhone, the textbox of the upload control has disappeared, and the button of the upload control is disabled.


Any ideas?

Many Thanks.




Intellisense / class reference not working in MembershipProvider derived class file in App_Code fold

  

Hi,

I am new to ASP.NET and may be biting off more than I can chew, but I figure if I jump in the deep end I may learn more.

Can somebody tell me why the Visual Studio intellisense is not working in a newly created class file inside the App_Code folder?

I presume that System.Web is not being referenced from the App_Code folder correctly for some reason, because as soon as I type "using System.Web", everything is fine and then stops when I want to add ".Security" (no dropdown). I think this has an influence on the fact that the inherited MembershipProvider in my code is not highlighted/referenced and I cannot use the "Implement Abstract Class" option.

If I create a new class file in the root folder of my website, everything works fine. I have even tried to delete and recreate the file in my App_Code and it still did not work. I also tried to copy the file from my App_Code folder to the root and it still did not work. My code is as follows:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;

namespace PodcastManager
{
    public class

Write a file on server via WCF is not working

  

i am trying to write file on the server through client side using jquery and it looks the writing this file on the WCF services is not working on the DEV box but i have tested on my local machine and it works as expcted and i get this error on fiddler: what might be wrong here????

ReadResponse() failed: The server did not return a response for this request.

public string GetKMLFile(long Id) 
{ 
   
KMLFile k = LoadData(id); 
   
// create a writer and open the file 
 
using (StreamWriter writer =

Downloading file not working with URL Rewritting

  

Hi,

I have implemented URL rewritting in my application. I did it in Application_BeginRequest located in Global.asax. My url rewritting in working fine. Now in order to maintain rewritting during post back.

I have added code line this.Form.Action = Request.RawUrl; in page load event in order to maintain rewritten URL during post back. When I am adding below code on image button click to download file it doesn't work. It says "Internet explorer cannot display webpage". When I am removing line this.Form.Action = Request.RawUrl; from page load then downloading file will start working but URL rewritting will not work on postback. Please let me know work around to handle such condition.

FileInfo objFi = new FileInfo(Server.MapPath(filepath));
this.Form.Action = Request.RawUrl;
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + objFi.Name);
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.AddHeader("Content-Length", objFi.Length.ToString());
HttpContext.Current.Response.ContentType = "application/octet-stream";
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.WriteFile(objFi.FullName);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();

 


Multiple file upload in IE9 not working?

  

hi

I have downloaded multiple file upload from this site http://www.codeproject.com/KB/aspnet/multiple_file_upload.aspx, but this is not working in IE9.

Is there any other link or sample which works in IE9?

Thanks


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend