DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 6 Jul 2007 19:56:01 -0400,    posted on: microsoft.public.dotnet.framework.aspnet.webservices        back       

Thread Index
  1    john
          2    John Saunders [MVP] john.saunders at trizetto.com
          3    (Steven Cheng[MSFT])


Client side jscript issue   
Working in Visual Studio

Objective: I am trying to have my server side vb code construct a file name 
for use with my client side JavaScript code to then save the file to the 
web. My saving to the web method is working with a preset test filename.



The issue I have is that when I put this JavaScript in the source code of an 
asp:content holder of a masterpage container, it is not able to see any 
server side controls, one of which is returning my filename I want to use.



In a standard HTML page where I worked out the code method it works fine, so 
I know the method works.



It is only in asp:content page, where there is no HTML that I cannot read 
the server side control.



I can read a HTMLInputText control in the asp:content page so long as it is 
not set to runat="server", but then my server side vb code cannot see it to 
write my file name to it for use with the JavaScript code.



I either need a way to read the server side control from the asp:content 
page with JavaScript,  or write to the HTMLInputText control not set to 
runat="server" when the server responds, or a different approach that allows 
me to get my filename in a way that the JavaScript can read it.



Here is a snippet of the code up to where the error on page occurs:



<%@ Page Language="VB" MasterPageFile="MasterPage.master" 
AutoEventWireup="false" MaintainScrollPositionOnPostback ="true" 
CodeFile="APcontent.aspx.vb" Inherits="APcontent" title="Accounts Payable" 
%>



<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" 
Runat="Server">





<script language="javascript" type="text/javascript">

// <!CDATA[

function File1_onclick() {

   var Var1 = document.getElementById("TextBox1").value; 'ERROR OCCURS HERE

         document.write(Var1);

//File saving code is here.

}

// ]]>

</script>



        <asp:TextBox ID="TextBox1" runat="server" 
Width="472px"></asp:TextBox>





</asp:Content>
Date:Fri, 6 Jul 2007 19:56:01 -0400   Author:  

Re: Client side jscript issue   
You'll probably get a better response on the 
microsoft.public.dotnet.framework.aspnet newsgroup.

-- 
John Saunders [MVP]
Date:Fri, 6 Jul 2007 20:41:34 -0400   Author:  

RE: Client side jscript issue   
Hi John,

Regarding on this issue, many community members and I have replied you in 
the new thread you posted in the microsoft.public.dotnet.framework.aspnet 
newsgroup.

Please have a look there and feel free to followup if there is anything 
else we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
 	

This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Mon, 09 Jul 2007 07:16:52 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us