Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










How To Pass The Values To A Javascript Function From Page


I've a a javascriptfunction in my master page JavaScript Function:

varmeetingID=null;
varpanelID=null;
varfileGridID=null;
functionopenPopup(meetingId,panelId,fileGridId)
{
meetingID=meetingId;
panelID=panelId;
fileGridID=fileGridId;
}

now what i want to do is i want to pass values for this function from asp.net page. suppose say from the eventhandler given below.

protectedvoidGridView1_RowCreated(objectsender,GridViewRowEventArgse)
{
/*somecodeheretogetthevalues*/

Nowiwanttopassthevaluestothejavascriptfunction.

itriedthisone

[Code]....


View 9 Replies (Posted: Feb 26 09)

Sponsored Links:

Related Forum Messages For ASP.NET category:
How To Pass JavaScript Function As A Parameter In The Route Values Of Ajax Actionlink
I need to pass javascript function as a parameter value to the ajax actionlink in asp.net mvc app. how can we achieve this?

Posted: Apr 20 10 at 6:51

View 1 Replies!   View Related
Javascript - How To Pass A Value From The Serverside Page To A Function In .JS File
I have to pass a string value from the server side page (.aspx.cs) to a function in .JS page. I need to call the function in JS page from server side page along with string as a parameter.

Posted: Jul 30 10 at 15:31

View 1 Replies!   View Related
C# - Pass Model Values As Javascript Function Parameters From Inside Mvc Html Helper Such A Html.Radio?
I think I need to drop in some escape characters, but I'm not quite sure where. Here is the javascript function I'm attempting to call:

function setData(associateValue, reviewDateValue) {
var associate = document.getElementById("Associate");
var reviewDate = document.getElementById("ReviewDate");
associate.value = associateValue;
reviewDate.value = reviewDateValue;
}

Here is the asp .net mvc line where I'm attempting to create a Radio button with a click event that calls the above function and passes data from the model as javascript parameter values.

<%= Html.RadioButton("Selected", item.Selected, new { onClick="setData('<%=item.Associate%>','<%=item.ReviewDate%>' )" } )%>

The above throws a bunch of compile issues and doesn't work. A call such as the following does call the javascript, but doesn't get the data from the model.

<%= Html.RadioButton("Selected", item.Selected, new { onClick="setData('item.Associate','item.ReviewDate' )" } )%>
<%= Html.RadioButton("Selected", item.Selected, new { onClick="setData('item.Associate','item.ReviewDate' )" } )%>
<% String functionCall = String.Format("setData('{0}','{1}')", Html.Encode(item.Associate), Html.Encode(item.ReviewDate )) ; %>
<%= Html.RadioButton("Selected", item.Selected, new { onClick=functionCall } )%>

Posted: Jul 20 10 at 16:38

View 2 Replies!   View Related
C# - Pass Value To Javascript Function ?
I have this code

<asp:GridView ID="gvCentersList" runat="server" AutoGenerateColumns="False"
DataKeyNames="CenterID" DataSourceID="SqlDataSource1" CssClass="gv-classic">
<Columns>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:CheckBox ID="GridCheckBox" runat="server" onclick="javascript:func1150(this,<%#response.write(CenterID)%>);" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="CenterID" HeaderText="CenterID" SortExpression="CenterID" />
<asp:BoundField DataField="CenterName" HeaderText="CenterName" SortExpression="CenterName" />
</Columns></asp:GridView><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" SelectCommand="SELECT ROW_NUMBER() OVER (ORDER BY CityName ASC) AS ROWID, * FROM [CentersList]"></asp:SqlDataSource>

my question in this line

onclick="javascript:func1150(this,<%=CenterID%>);"

how can I pass the CenterID to the func1150 ?

Posted: Jul 11 10 at 6:41

View 2 Replies!   View Related
Pass Javascript Value To Function?
the question says it all : i have a linkbutton to which i pass through CommandArgument a value and i need that value to be a javascript value.Edit : here is my linkbutton tag :

< asp:linkbutton id="prevBut"
runat="server" OnCommand="load_com"
CommandArgument=to_place_javascript_string

[code]...

Posted: Jan 3 at 15:20

View 3 Replies!   View Related
Pass A Value To A Javascript Function?
I need to call a Javascript function to launch Word on the client's machine. I also need to execute a macro (named PopulateTemplate) to populate some terms on the Word document.I can get all of this to work so long as I pass a hard-coded string in the code as below:

[Code]....

The real need though is that the parameter 24 as above changes dynamically for each user. In the back-end code of the ASP.NET page I retrieve this from a database. I need to pass this parameter to the Word macro. I've tried populating a HiddenField on the form but I can't get the Javascript to pick it up. I have wrapped single quotes and double quotes around the Hidden field's ID but neither seem to work. I get no error message.

[Code]....

Posted: Aug 12, 2009 11:56 AM

View 5 Replies!   View Related
Pass ID From GridView Row To JavaScript Function?
The first commented line below is working with a hardcoded ApplicantId, and all I need is to make it work by passing the current ApplicantId column on the same gridrow.

I've tried for many days now, and something like the second commented line does not work for me.

<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
DataKeyNames="ApplicantID" >
<Columns>
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<!-- works -->
<asp:HyperLinkField NavigateUrl="javascript:popUp(3)" Text="Select" Target="_parent"/>
<!-- doesn't work -->
<asp:HyperLinkField NavigateUrl='"javascript:popUp("<%# + DataBinder.Eval(GridView1.DataItem,"ApplicantId") %> + ")"' Text="View" />
</Columns>
</asp:GridView>

Posted: Sep 3 10 at 19:42

View 1 Replies!   View Related
Pass The Value Inside A Javascript Function?
i want to pass the value of abcd inside a javascript function. below are my codes. am i doing it right? cause i do not seem to be able to get it working

this is the url

default.html?test=abcd and this is the body onload <body onload="highlightSearchTerms('<%=Request.QueryString("test")%>')">

Posted: Sep 10, 2009 02:33 AM

View 6 Replies!   View Related
Pass Xpath Value In Javascript Function?
here my code that gives error-

OnClientClick='javascript:DragRevId(<%# XPath("ReservationId") %>);return false;'

Posted: Apr 5 at 6:00

View 1 Replies!   View Related
Web Forms :: Pass Asp.net Control Id To Javascript Function
I had few linkbuttons.i need to call a javascript function on a linkbutton click .i need to send the clicked linbutton id as input parameter to the javascript function.my code is below

<asp:LinkButton ID="lbtnWelcome" PostBackUrl="..aspx" OnClientClick="return changeColor(this);" runat="server" CssClass="linkbutton" Text="Welcome"></asp:LinkButton>|
<asp:LinkButton ID="lbtnHome" PostBackUrl="...aspx" OnClientClick="return changeColor(this);" runat="server" CssClass="linkbutton" Text="Home"></asp:LinkButton>

function changeColor(id) {
var idd = document.getElementById(id);
alert(idd);
return false;
}

but the idd value is null always

Posted: Nov 23, 2009 06:18 AM

View 7 Replies!   View Related
How To Pass A List Of Values To Compare In A SQL Function In SQL Server 2008?
I have an SQL Function with the following SQL within:

SELECT StockID FROM (SELECT DISTINCT StockID,
ROW_NUMBER() OVER(ORDER BY DateAdded DESC) AS RowNum
FROM Stock
WHERE CategoryCode LIKE @CategoryID) AS Info
WHERE RowNum BETWEEN @startRowIndex AND (@startRowIndex + @maximumRows) - 1

I have a Parameter @CategoryID - however I need to take in a category ID such as "BA" and translated this to a list of Category IDs such as "IE","EG" etc so my WHERE clause looks like:

WHERE (CategoryCode LIKE 'IE' OR CategoryCode LIKE 'EG') AS Info

I have a Lookup Table which contains the "BA" code and then all the real category codes this means such as "IE" and "EG".How do I have the CategoryID expand to multiple "OR" statements in my SQL Function?

At the moment the query as shown can cope with one CategoryID such as "IE", this is done as I want a category page such as category.aspx where a parameter "BA" is passed such as category.aspx?category=BA and this page will list all items with the category codes "EG" and "IE".

The reason I need this is there is a "parent" category code which has multiple "children" category codes which are different to the parent code. I am using ASP.NET and .NET 3.5 on the front-end if this helps.

Posted: Feb 18 10 at 16:08

View 2 Replies!   View Related
Web Forms :: Pass Name Of The Textbox Control To Javascript Function
pass name of the textbox Control to javascript function

[Code]....

<script
type="text/javascript"
language="javascript">
var sum = 3;
var textboxObj,ObjName;
function validate(textboxObj,ObjName) {
alert('Hello');
var arrayOfObjects = document.getElementsByName(ObjName);
alert(arrayOfObjects.length);
for (var i = 0; I < arrayOfObjects.length;i++) {
alert('Inside for loop');............................

Posted: Dec 22, 2010 11:29 AM

View 9 Replies!   View Related
Pass Parameter As Text To JavaScript Function From Code Behind
Basically, I have a gridview that is opened in a new window from the parent window. It has a bunch of records with a view button to view the details of each record (which stays in the same newly opened window). I have a calendar in the parent window that accepts a Date querystring parameter to set the current date on the calendar at page load. I'm just trying to refresh the calendar in the parent window to match the date of the label in the newly opened window. All the code below is in the newly opened window. The .Net code-behind below refers to when that view button is clicked and everything is populated. At the end, I call the js to refresh the parent window and pass the value of the LabelScheduleDate as the querystring parameter. Now the label comes through as '03/25/2010' in the code-behind, but when I pass it to the js, it comes through as '0.00005970149253731343' in the end querystring. I'm not really sure what is making the value change, and I want to pass it as just text. Do I need to pass it as a string object? I tried but I don't think I was doing it right.

JavaScript Function
function RefreshParent(inputDate) {
window.opener.location = window.opener.location + "?Date=" + inputDate;
}
.NET Code-Behind
Protected Sub RadGridOnlineRequests_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGridOnlineRequests.ItemCommand
If e.CommandName = "ViewOnlineRequest" Then
' populates LabelScheduleDate among other controls values
ScriptManager.RegisterStartupScript( _
Me, Me.GetType(), "clientScript", "RefreshParent(" & LabelScheduleDate.Text & ");", True)
End If
End Sub

Posted: Mar 23 10 at 14:33

View 1 Replies!   View Related
Web Forms :: Call Javascript Function - Can't Pass The 2 Argument
in aspx:

function checkFunction(no,name){
}

in cs:

string test_name ="hello";
StringBuilder Strname=new StringBuilder();
Strname.AppendLine("<td ><input type=checkbox onclick='checkFunction("+no+","+test_name+");' runat='server' name='checkbox_name' value='XX'</td>");

when i call the checkFunction(), i can't pass the 2 argument as there is error.

Posted: Jan 19, 2010 06:13 AM

View 3 Replies!   View Related
Pass Eval As Javascript Function Parameter In Gridview?
I have the following:

<EditItemTemplate>
<asp:Button ID="wrqst_need_ind_btn" runat="server" Text = "Create WR"
onClientClick="javascript:popUp('popup_createWR.aspx')"
CommandArgument='<%# Eval("dvc_nm") + "|" + Eval("data_orgtn_yr") %>'/>
</EditItemTemplate>

I want to pass in as two additional params the Eval("dvc_nm") and Eval("data_orgtn_yr") to the popup function.

UPDATE:

I tried by removing the single quotes from insode the <% %> tags. Which gave me this:

onClientClick='<%# "javascript:popUp(popup_createWR.aspx," + Eval("dvc_nm") + "," + Eval("data_orgtn_yr") + ")" %>'

which complied, but when I clicked the button I did not get a pop up, the page just posted back and reloaded and said errors on page, but no popup...

Posted: Jun 25 10 at 16:26

View 2 Replies!   View Related
Javascript - Ajax Call Pass Parameters To Function?
What is wrong with this code? I am trying to pass parameters to a WCF function. I couldn't get this to work. I am getting Ajax error.

$.ajax({
url: applicationPath + "/Test.svc/GetData",
type: "POST",
dataType: "json",
data: '{GId":' + sender.get_value() + '"GName":' + sender.get_text() + '"mId":' + testId + '}',
contentType: "application/json; charset=utf-8",
success: function(result)
{
//trying to fill combobox here
},
});

Posted: Feb 7 at 21:04

View 1 Replies!   View Related
Pass An Anonymous Array Of Strings To A JavaScript Function?
I want to pass to an array of controls' IDs to a javascript script function so it will switch control's enable state.

For example, in C# it would be like this:

func(false, new[] { "Control1", "Control2", "Control3" });

In that function I want to find corresponding controls and disable/enable them. For one control I do this next way:

<script type="text/javascript" language="javascript">
function switchControls(value, arr) {
for (var n = 0; n < array.length; n++)
document.getElementById([n]).disabled = value;
}
</script>
<asp:CheckBox runat="server"
onclick="switchControls(this.checked,
[
'<%= Control1.ClientID %>',
'<%= Control2.ClientID %>'
])"
Text="Take?" />

How to implement this properly? Have I to use jQuery?

Posted: Apr 5 10 at 17:48

View 3 Replies!   View Related
Web Forms :: Pass Variable As Html Control Through To Javascript Function
I have a function that gets the position of acontrol.

[Code]....

All the function needsis an htmlcontrol being fed to itas the parameter(elemRef). Ican declare avariable in Javascript of the samecontent page but differentfunction and pass the parameter successfulllygetting returned values. For example, if I have the following function:

function (getPosition)
{ var txtBox1 = document.getElemendById('<%=txtBox1.ClientID %>');
getPos(txtBox1);
}

I will get the coordinates of the control txtBox1. But how can I accomplish this if I am calling this function from a javascript function or codebehind of the Master Page, or codebehind of the same content Page.

Posted: Jan 24, 2011 11:59 PM

View 4 Replies!   View Related
Web Forms :: Using Javascript, Call One Function From Another, Pass A Variable That Represents?
I have a variable created to manipulate a contorl on a page:

var pnl= document.getElementById('<%=pnl1.ClientID %>');

[Code]....
[Code]....

Posted: Jan 20, 2011 06:41 PM

View 1 Replies!   View Related
Forms Data Controls :: Pass A Datafieled Value In Javascript Function?
I want to pass a datafieled value in javascript function. Here is my code

<asp:Button ID="btn1" Text="abc" OnClientClick='<%# Eval("CID","return fnDisp( {0} )")%>' runat="server"></asp:Button>

The CID datafield have the value as "37,98,99". But I'm getting only the first value in the fnDisp. i.e 37.

Posted: Nov 19, 2009 03:50 AM

View 1 Replies!   View Related
MVC :: Pass Parameter To Javascript Function From OnSuccess Event In Ajax.ActionLink?
When I use:

new AjaxOptions { UpdateTargetId = "VoteCount" + indx, OnSuccess = "AnimateVoteMessage" }

everything works fine...but I am trying to animate items in a list, with automatically assigned ID's. Since I want each of these to be addressable from my javascript, I believe I need to pass a parameter to my javascript. But when I use:

new AjaxOptions { UpdateTargetId = "VoteCount" + indx, OnSuccess = "AnimateVoteMessage(2)" }

I get an " Sys.ArgumentUndefinedException: Value cannot be undefined." exception. Well I get that when using the debug versions of MicrosoftMvcAjax.js. When using the compressed version I get a "Microsoft JScript runtime error: 'b' is null or not an object" So my question is, can I pass a parameter to my javascript function using the OnSuccess event for a ActionLink?Is this the right approach? How else am I going to have one javascript function have the ability to be run on 10 items (in my case the IDs of multiple DIVs) on my page?

Posted: Apr 27, 2009 06:50 AM

View 6 Replies!   View Related
How To Pass Values To Javascript From Code Behind
Basically I want to display a popup box only at a specific time in asp.net application. so i'm using the following

[code]....

but this code is not working. the alert box is not popping up. is this a correct method to pass values to the script?. or what else to be done to meet the requirement?.

Posted: Oct 28 10

View 1 Replies!   View Related
How To Pass Values From Querystring To JavaScript
Now that i learned how to pass values to an SWF object via flashvars, how can i pass values from a querystring to javascript?

What do i mean? In the following example i hard-code the xml file to load in the SWF object.

<script type="text/javascript">
var so = new SWFObject("preview.swf", "", "100%", "100%", "9", "#ffffff");
so.addParam("allowFullScreen", "true");
so.addParam("scale", "noscale");
so.addParam("menu", "false");
so.addVariable("xmlPath", "xml/exampleData.xml");
so.write("flashcontent");
</script>

Since the Xml file is created dynamic, the xml should be loaded from the value of a query-string. (I guess).

Supposing my url is http://www.example.com/load.aspx?XmlFile=SomeData

How can i pass it to the javascript side? Like..

so.addVariable("xmlPath", "xml/<% SomeData %>.xml");

or whatever it needs to make it work.

UPDATE: Besides the above example, is there any way of creating the JavaScript, in server-side?

Posted: Nov 4 10 at 8:05

View 3 Replies!   View Related
JQuery :: How To Pass TextBoxs Value In Repeater Control In JavaScript Function On Click Of Button
In a repeater control there is TextBox and corresponding to each TextBox there is Button control.On click of Button how can i pass TextBox's text that user has just entered ?

Below is the code:

[Code]....

Means on click of each Button how to pass there respective TextBox's data to a javascript function ?

Posted: Jan 25, 2011 04:57 AM

View 17 Replies!   View Related
Forms Data Controls :: Pass And Get A Div Id Inside A Gridview As Parameter To A Javascript Function?
In my gridview iam having a Div, which i expand and collapse on a button click througha Javascript fun, by passing the div id as paratmeter toJS fun, the code is

<asp:GridView
ID="GridView1"
runat="server"
DataSourceID="SqlDataSource1"
AutoGenerateColumns="False">

[Code]....

The problem is, here iam getting null for 'e',because during runtime the gridview div id got changed. i tried div1.ClientID also it didn't worked. how to pass div id to Javascript function.

Posted: Oct 02, 2009 04:30 AM

View 6 Replies!   View Related
Forms Data Controls :: Pass EditTemplete Textbox Id To JavaScript Function On GridView Row Databound
I've a textbox inside the editItemTemplate of a gridview. I want to write a javacsript to be called on thsi textbox.It should check the date is greater than or equal to today's date or not.

In RowDataBound event of the gridview , i'm findng this textbox control, passing it's clientId to the javascript function that is written

[code]....

Posted: Dec 28, 2009 06:28 AM

View 2 Replies!   View Related
Passing Database Values To Javascript Function?
i have javascript file named as sample.js,

[Code]....

above i need to pass lat long values from server methods,means from .CS file.

how do i do this stuff.

Posted: Nov 20, 2009 06:09 AM

View 7 Replies!   View Related
AJAX :: How To Pass 2 Variable Values Using JavaScript To A Web Service
How can I pass two variable values to a web service web method using JavaScript and a DynamicPopulateExtender?

Some background of my issue:

I have a fully working cascading drop down list accessing a database.

My parent Cascading Drop Down List is a list of countries and the child displays the relative regions i.e.: USA returns Iowa, Maryland, Oregon etc.

I also have a 3rd Drop Down List control that allows the user to select the language to display the region details i.e.: Selecting the language of Chinese will return a list of regions of the USA in Chinese (held in the database).

I now want to display the translated country name from the 3rd Drop Down List in a label on the page.
I cannot just use the text from the country drop down list as this text value remains in English. The translated value must be returned from the database.

So far, I have installed a DynamicPopulateExtender:

[Code]....

I then wrote a web method (in the Cascading Drop Down local Web Service) to return the translated country name. To do this I have had to hard code the countryID (10663) and the translationLanguageID (1331) asshown below:

[Code]....

This does return the translated country name, but the variables are hard coded!

My question is how do I pass the countryID and the translationLanguageID to the Web Method GetTranslatedCountryName()from the DynamicPopulateExtender? Or even if there is a better way to achieve my task?

Posted: Mar 07, 2010 09:28 PM

View 2 Replies!   View Related
JavaScript Function Checking The Values Before Inserting Into Database?
I've been searching for a solution ..but not yet found.Here is my requirement.

In my webpage one button ,Edit, is available whenever user clicks on tht button ..it will displays one modalpopup window contains an updatepanel.. and inside that we've 10 textboxes and two buttons update and close.whenever user clicks on the update button ..it has to check whether all the textboxes has values or not ..if it yes continue if not alert the user saying tht so and so textbox is empty plz provide the value.

How can i do this in ASP.NET 2.0 ,im using AJAX.

My doubt is tht how can we display a popup from upon a popup..is it possible ?

Posted: Feb 19 09

View 4 Replies!   View Related
Call Javascript Function Of Child Page From Master Page Javascript?
I am writing an ASP.Net application. I am making use of master page in it. I have several child pages with me, which consist of some java script functions; Let's say;

function ChildPageFunction()
{
//Do something;
}

And master page java script function as;

function MasterPagefunction()
{
//Need to call ChildPagefunction(); here
}

Now is it possible to call ChildPageFunction() from MasterPageFunction()?

Posted: Jul 28 10 at 14:27

View 2 Replies!   View Related
Forms Data Controls :: Pass The Fields Values To The JavaScript Variables
i am still stcuk with my project and unabale to perform calculation on my edited gridview..

here is my problem :

i have fields (f1,f2,f3, f4...) pulled from my sql data base table. into a gridview.

the "f4" field value is based on some calculation done on f1, f2 & f3 field values..

1- i need to have the same calculation done when i edit and update f1, f2 & f3 on my gridview...

more complicated..

2 -my calculation are based on a javascript function ...

a- how can i pass the fields values to the JavaScript variables...perform the calculation....then reassign back the result varibale to the f4 field ?? ..then update my gridview with the new calculation..

[code]....

Posted: Mar 13, 2010 02:18 PM

View 6 Replies!   View Related
Forms Data Controls :: GridView Passing Values To JavaScript Function?
I am using a Gridview in n-tier architecture. And populated it programatically. Each GridView row have two fields. Name and Id.

I want to pass the Id to a javascript function whic will be attached to the Name.

Posted: Dec 08, 2009 05:56 PM

View 4 Replies!   View Related
Forms Data Controls :: Passing GridView Row Bound Values To JavaScript Function
I have a GridView with an image button ina TemplateField in the last column.

I wouldlike to pass theGridView row values (Bound Field Values - a record) to a JavaScript function to create another html table of selected records in ClientSide (like jCart-A shopping cart).

I would like to know how to pass all GridView column values to thejavascriptwhen the image at the end of therespective row is clicked.

Posted: Oct 28, 2010 03:07 PM

View 5 Replies!   View Related
How To Use Javascript Function To Hide And Show One Table Using Checkbox List Values In Content
I have a Master Page . then I have created one Content Page.I have one checkbox List in Content Page .I want to Hide and Show one table/text box/div/image according to the check box select item.So I want to use Javascript function and which will be client side and then it ll be faster to use.

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="EduMaster.master.cs" Inherits="Education_EduMaster" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[code]...

Posted: Dec 04, 2009 08:30 AM

View 6 Replies!   View Related
AJAX :: JavaScript Function To Pass Value From MasterPage.aspx To Default.aspx And Then Refresh UpdatePanel
For example, I have master page MyMasterPage.aspx and content page MyDefault.aspx. I have many UpdatePanels at MyMaterPage.aspx, and also I have many UpdatePanels at MyDefault.aspx.

[code]....

I want JavaScript functionClickMenu(this) at input button [id="ButtonMaster1" @ MyMasterPage.aspx] pass its value ["Menu-1"] into text box [id="TextBoxDefault1" @ MyDefault.aspx], and then performing update / doing post-back to server ONLY FOR UpdatePanelDefault1.

I am looking forward an example code for JavaScript functionClickMenu(this).

Posted: Feb 26, 2011 11:47 PM

View 4 Replies!   View Related
Javascript - How To Pass Page Or Master Page Object To AJAX Page Method
I wrote a page Page method in my aspx page. in web service method I need to call FindControl method return textbox and get text box value. But my findControl will take MasterPage object to iterate.

code.<script type = "text/javascript">
function ShowCurrentDateTime() {
$.ajax({ [code]....

But I am getting compiler error when use Page.Master: Reference to non-shared member requires an object reference

How to pass Master Page object or Page to Page method?. So I can use in Sared method.Is there any way I can access Textbox value directly in Page method? I need access couple of controls in Page Method.

Posted: Oct 5 10 at 5:18

View 4 Replies!   View Related
Pass Values From One Page To Another?
i have one scenario in which i have to pass values from one page to another for that currently i am using querystring but now the values are more so i want to remove querystring and i dont want to user session as well and so i have tried using Hiddenfields but after redirecting to another page the values are cleared from all the hidden fields.

Posted: Mar 17, 2010 11:13 AM

View 14 Replies!   View Related
How To Run The Javascript Function On The Page Onload Event In Content Page Of Master Page
HOW TO RUN THE JAVASCRIPT FUNCTION ON PAGE ONLOAD EVENT IN CONTENT PAGE OF MASTER PAGE.?

means i have masterpage and the content page of master page namely default.aspx in vb.net

My problem was that .

i wanna run javascript function in Default.aspx and i have called the function

body onload in master page..

when i run my website it shows the error

"" Microsoft JScript Runtime Error : Object Expected ""

Posted: Nov 4 10 at 10:12

View 4 Replies!   View Related
Web Forms :: How To Pass Values From One Page To Another Page Using Querystring
in my webpage pass values from one page to another page Querystring

in first page there two textboxes both textbox values pass to them ,but sometime only one value select if am entering only

first textbox value it will pass,if am entering only second textbox value it wont pass value the value taken like that

Response.Redirect("~/Admin/VegaFABS.aspx? symbol=" + txtSymbol.Text);
second page
string s2 = Request.QueryString["symbol"];

Posted: Dec 07, 2010 05:37 AM

View 3 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved