Asp.net - Pass Value From Javascript To Aspx?

Jan 14, 2012

i had a javascript to detect user broswer width and want to pass the width to aspx.vb.

function chk_width() {
var winW = document.body.offsetWidth;
document.getElementById("hiddenfieldsize").value = winW;
// alert(winW);
}

View 3 Replies


ADVERTISEMENT

Pass A Value Bounded With A Button In Form1.aspx To Form2.aspx?

May 2, 2011

Im trying to pass a value bounded with a button in form1.aspx to form2.aspx

form1.aspx:
<asp:Button ID="Button1" runat="server" Text="Button" CommandArgument = '<%#Eval("Parking_ID")%>' />

[code].....

View 2 Replies

Pass Parameter From Page1.aspx To Page2.aspx Via The Session?

Jun 8, 2011

I have two aspx pages. I need to send a textbox(record_id) value as a parameter from page1.aspx to page2.aspx to be utilized within a SqlCommand query in the VB code behind page. I would like to pass this parameter using the session. Page1 is a gridview which displays records from a sql datasource and on the edit button click the user is redirected to page2 which populates several textboxes and drop down lists and allows the user to edit the record.

page1.aspx:
<div id="header">
<h1>Page1</h1>

[code]......

View 1 Replies

.net - Passing Variable From .aspx.vb To .aspx Javascript Variable

Jan 11, 2011

How do I pass a variable difined in .aspx.vb to .aspx. I've tried this in the .aspx.vb:

[Code]....

'postcode' is not declared. It may be inaccessible due to its protection level. What am I doing wrong?

View 1 Replies

Run Javascript Function From Aspx Page?

Jul 1, 2011

I have written some code there are 27 different functions that execute like this..

[Code]...

View 1 Replies

Asp.net - Access Variable Of Javascript In .aspx.vb File?

Dec 3, 2011

I want to access variables defined in Javascript in.aspx file to .aspx.vb file How can i access variables in .aspx.vb file?

[Code]...

This is simple javascript I'm using in my .aspx page

now i want to access the variable h m and c in .aspx.vb page how to do that?

View 1 Replies

JavaScript - How To Resize IFrame On Load In ASPX Page

Feb 8, 2011

In an .aspx page with a VB.NET codebehind I am using an IFRAME which would be created inside the repeater control. Since I want to resize the IFRAME based on the content within the page I have been using the resize function obtained from here on the IFRAME onload as shown below.

<iframe id="IframeSubsectionArea" scrolling="auto" width="100%" onload="resizeIframeToFitContent(this)" runat="server">

However it is throwing an error as the method could not be found in the form. Is there any client side script variant for the onload event?

View 1 Replies

JavaScript - Opening New Window To Display Another ASPX Page

Dec 6, 2011

In my code behind, I need to open a little window that displays another aspx page. I have found many ways to do this in JavaScript, but haven't been able to find a way to do it using VB.Net. Looks like you can call window.open() in JavaScript. Is there a VB.Net version of this call, or is this something that has to be done client side?

View 2 Replies

Register Javascript File To Aspx Page From WebReousrce?

Jul 7, 2010

How do i add my javascript file as an embeded resource to the page after the ajax javascript already on the page? NB want to do this part dynamically to have code wrapped up in usercontrol.

in aspx page: scriptmanager
Code: Assembly: WebResource("Functions.js", "text/javascript")
Code: onPreRender:
ScriptManager.RegisterClientScriptResource(Me.Page, Me.GetType().BaseType, "Functions.js")

This code successfully adds my javascript code to the page but not after the AJAX javascript and so not all of my functions work correctly.

View 1 Replies

Asp.net Pass Variable From Code Behind To .aspx?

Sep 25, 2010

I can't find a way to pass a simple variable from my code behind file to the .aspx page.

In code behind I have:

Dim test As String = "test"

and in my aspx page I try: <%=test %>

that gives me the following error: Error 2 'test' is not declared. It may be inaccessible due to its protection level

View 4 Replies

Javascript - How To Call The Jquery Function In .aspx Page To Usercontrols Controls In Asp.net

Jan 27, 2011

i have the following function in default.aspx i have webusercontrol which have 10 checkboxes and 1 button i want when i click on button1 of user control then it can access the function of default.aspx page ...if i dragged the usercontrol to default.aspx

[Code]...

View 3 Replies

Pass ID Parameter To An Aspx Modal Window?

Oct 16, 2011

I have a repeater control that contains a hyperlink which the user will click to launch a custom aspx modal window. The hyperlink contains the "record id" value.

The user clicks the hyperlink, the code passes from code behind to javascript, which launches the custom aspx window.

How do I pass the record id parameter from javascript function so that the aspx modal window being launched can retreieve it, and run a sql query with that value.

View 1 Replies

Javascript - Open New Window Passing The Text And Value Of A Dropdownlist On OnClientClick Of Button In Aspx Page

May 25, 2011

I am making my site compatible to all browsers.For that on one page i am selecting the name from dropdownlist and on click of VIEW(button),i want to open a new window .i also want to send the value and text of ddl on new window. all of this i want to do on onClientClick or onClick of button...

for getting the value i hv tried this code:-

input name="button1" type="button" id="btnview" style="cursor:hand" class="Buttons" title="View" value="View" onclick="alert(document.all('<%=ddlScheme.ClientID%>').value);"

[Code]....

View 1 Replies

Asp.net - Pass Value From Javascript To Vb Sub

Feb 6, 2012

i have a javascript function in aspx file now i use vb as back in asp.net now i use postback from javascript like this

[Code]...

now i dont get that "1" in my vb code i want to get it because i want check when i get page_load event by post back by this javascript

View 2 Replies

Asp.net - Pass Javascript Variable To Codebehind?

Dec 26, 2011

Is it posible to get a value from a javascript variable and use it into visual basic code without incrusting value on any control.

View 1 Replies

Asp.net - Pass The Value Of A Control In A Datalist To JavaScript?

Aug 16, 2009

I have a datalist like this:

<asp:DataList ID="dl" runat="server" Width="301px" onitemcommand="dl_ItemCommand">
<ItemTemplate>
<table style="border:solid 1 #CCCCCC" >

[code]....

I want to pass src of imagePhoto to function showLayerUpLoad().How can i do that.Can i do this in ItemCreated event.

View 1 Replies

Javascript - Close Child Aspx Page If Gridview Index Is Changed On Parent Page?

Nov 17, 2011

I have a parent page and child page, both aspx. All is working, but now I would like to close child page, if user leaves child popup page and goes back to parent page and clicks on something else like page index of Gridview. I CANNOT close popup child page if user goes to another app, or some other location, I only want to close if something on parent page is changed.

I have the PageIndexChange Event set up for other purposes, I would just like to add some functionality, perhaps a script manager to close the child popup page if the Gridview index is changed, java or another way which ever works best.I think I might also need to check if the child page is even open.

[Code]...

View 1 Replies

Javascript - Pass JSON File From ASP.NET To JQuery?

Feb 27, 2012

my problem is that my company does not want to serve up the .json MIME type, so I have to use ASP.NET to fetch the JSON file from the file server. Currently I have jQuery that does a getJSON and traverses the JSON object to build certain elements of the page. Is there a way I can use ASP.NET (VB) to give the object to my jQuery script after I fetch it?

View 1 Replies

Pass A Javascript Variable To OnMouseOver Event?

Sep 12, 2011

How can i use a js variable in mouseOver event?Here is my code:

<script type="text/javascript">
window.String1 = <%=GetLocalResourceStringEscaped("String1")%>;
window.String2 = <%=GetLocalResourceStringEscaped("String2")%>;

[code].....

View 3 Replies

Pass SQL Stored Procedure Results To Javascript?

Jul 19, 2011

I have an asp.net page that contains a javascript function. I am using a vb.net code behind to run a stored procedure against the database to pull back address information. Results can be 1 or more rows. I need to pass the results to the javascript for processing. My code is as follows:

VB.NET

Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

[Code].....

View 2 Replies

Asp.net - Pass Parameter As Text To JavaScript Function From .NET Code-behind

Mar 23, 2010

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;
}

[Code]....

View 1 Replies

Retrieve A Querystring Value From An .aspx Page And Pass It To Ascx Page?

Jul 8, 2011

Is is possible to retrieve the ID value from the Request.QueryString from a aspx file and pass it onto a ascx file in order to successfully update a profile using the retrieved ID?

View 4 Replies

Asp.net - Using Javascript On An Aspx Page That Uses A Master Page - Which Contains The Page In A Form?

Aug 7, 2009

I have a master page which contains everything that inherits it within a form. A page inheriting from it needs to run some javascript to act on a text field on a page. However, I can't seem to reference that text field through the javascript, since the form begins on the master page. The following line will come up bogus: document.form1.txtFindUser.value = blah.responseText; This is because form1 is defined on the master page, while txtFindUser is on the current page.

View 3 Replies

Have Page1.aspx Refresh Once Page2.aspx Is Closed?

Feb 22, 2012

If Page1.aspx opens Page2.aspx in a window, how can I have Page1.aspx refresh once Page2.aspx is closed?I have a page with data on it and I have a LinkButton set up so the user can edit that data. The LinkButton launches another windowed page with some text fields and a "Save" & "Cancel" button. Once one of those clicks I execute a save and close the window OR just disregard the information and close the window. I was hoping to have the initial window with the data on it refresh once the 2nd window is closed.

View 1 Replies

C# - Broken Link Between Aspx And Aspx.cs Files?

Oct 27, 2010

I've had the same problem a couple of times with different ASPX pages after renaming them and I am surprised that I can't find someone else with the same problem on stackoverflow.When I run my ASP.NET C# project, the debugger gives me a message like this one.

Error 5 The name 'txtTitle' does not exist in the current context

It seems that the aspx and aspx.cs files at no longer bound. The only fix I have found for this is to recreate the page and copy/paste my code. how to fix this without recreating the whole thing?

View 4 Replies

Write The Contents Of B.aspx On A.aspx?

Jan 16, 2009

I have two asp pages. a.aspx is layout and b.aspx is content. I want to display the contents of b.aspx inside a <div> on a.aspx. I know with PHP you can do it like so:

//a.php
<html>
<head>

[Code]....

View 5 Replies

Javascript - Pass Page Or Master Page Object To AJAX Page Method

Oct 5, 2010

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.

see my code

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

[Code]....

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.

View 3 Replies

Asp.net - Transfer Textbox1 Value From Default1.aspx To Textbox1 Of Default2.aspx In Hidden Parameters?

Mar 2, 2011

I have two webpage in my website namely Default.aspx and Default2.aspx

I have asp.net textbox1 and button1 inside Form tag in Default.aspx page

and i have textbox1 inside form tag in Default2.aspx page

i want when i wanna transfer the textbox1 text of default.aspx page into default2.aspx textbox1 text hidden parameters ... which will not show query string in address bar and transfer value from one page to another..

View 2 Replies

Unable To Access Textbox Variable Declared In Aspx File From Aspx.vb File

Dec 27, 2011

I have following abc.aspx file:

[Code]...

When i try to use this it gives error: txtSearch is not accesible? what am i doing wrong here? This is not complete code just a snippet. But i think it gives an idea what am i trying to do.

View 1 Replies

How To Redirect To Another .aspx Page On Clicking On A Rectangle On A .aspx Page?

Mar 18, 2011

how to redirect to another .aspx page on clicking on a rectangle on a .aspx page? mention the whole program including headers, preferably in vb

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved