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


Advertisements:










AJAX :: Javascript Didn't Called On Postback


i have two dropdownlist (Country, and State) so when the user select the "country" the "state" will be filled.

So on postback the ajax will work, and i have some javascript function that called on thIe page load.

the javascript didn't called.


View 1 Replies (Posted: Nov 24, 2010 10:37 AM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
AJAX :: RegisterDataItem Can Only Be Called During An Async Postback
I'm trying to use the popupcontrol from the Ajax Control Toolkit, but I get the following error message:

"RegisterDataItem can only be called during an async postback "

during the call "PopupControlExtender1.Commit(Calendar1.SelectedDate.ToShortDateString());"

[Code]....

Posted: Oct 25, 2006 07:04 AM

View 22 Replies!   View Related
AJAX :: External Javascript Not Called While Calling It From A Control Inside Modal Popup?
I am getting an error while calling a javascript from a dropdownlist which is placed inside a modal pop-up panel. if i am ebeding a small script like onchange="javascript:alert('hello');", it works fine. But if i m using <script> </script> for embeding a javascript its showing 'object doesn't support this property' error. when i debugged it the compiler does not get into the javascript function.

Below is a screenshot of that page.

Posted: Mar 27, 2010 03:19 PM

View 3 Replies!   View Related
GridView Does Not Databind/refresh Upon Postback Unless The Postback Is Called By Itself?
Anyone with similar conclusion? GridView does not databind/refresh upon postback unless the postback is called by itself?

Posted: Jul 24 10 at 4:03

View 1 Replies!   View Related
AJAX :: Fire A Javascript Onclick Function Before The Server Side Event(SelectedNodeChanged) Called?
I have developed a web application which contains aspdotnet treeview control. In this treeview control has binded with some database value.. that controls has one parent node and more than one child nodes for each parent node.

my problem is here, when the user clicks the parent node, I need to fire a javascript onclick function before the server side event(SelectedNodeChanged) called..

If I provide javascript to the parnet node when it is binding, then I could not fire the server side event(SelectedNodeChanged).

How to provide onclick javascript event for parent node in treeview control even the parent node has SelectedNodeChanged event.

Posted: May 12, 2010 12:17 PM

View 6 Replies!   View Related
Javascript - Div Above Another One JQuery Script Didn't Work?
I have two divs, and I just want the second one to be under [in z-index] the first one, I read about it here and I figured out that I have to use the following JQuery script:

<script type="text/javascript">
$('#secondDiv').insertBefore('#firstDiv');
</script>

I tried it, but it didn't work with me,

<DetailedTemplate>
<div id="firstDiv" style="background-color:Black">
<asp:ImageButton ID="SelectButton" Visible='<%# org.SelectedValue == null || Container.DataElement("ID").ToString() != org.SelectedValue.ToString() %>' runat="server" CommandName="Select" CommandArgument='<%# Container.DataElement("ID") %>'
OnPreRender="SelectButton_PreRender" style="border-style:none; Height:58px; width:113px; cursor:hand" ImageUrl="~/Contents/Images/item-background.png"/>

[Code]....

Posted: Jan 19 at 10:26

View 2 Replies!   View Related
OnLoad Not Being Called On Postback?
I have a composite control that's in a webform. The OnLoad method in this control is where i'm opening up the database connections to be used in the control. Everything works fine when the control is loaded, but when the control is posted back to, the database connections aren't being opened, almost as though OnLoad isn't being called on postback...

like this:

protected override void OnLoad(EventArgs e)
{
// open database connections here...
}

Posted: Mar 04, 2009 06:14 AM

View 1 Replies!   View Related
Javascript - How To Display Modal After Postback Without Ajax
I have an ASP.NET button. When the button is clicked, I'd like a modal popup to display after the server-side code for the button runs. I don't want to use the ASP.NET Ajax control toolkit modal popup extender.

With ASP.NET Ajax, I can hook into the end request event. Is there a way to do this without ASP.NET Ajax. just jQuery? I basically want to run some javascript after the server side click code runs, after the postback.

Posted: Aug 16 10 at 15:24

View 2 Replies!   View Related
How To Generate Ajax Postback For Only One Updatepannel In Javascript
when I click a button the content inside my updatepannel changes. The id of the button is set as a trigger for the updatepannel, so that the other updatepannels are not affected. How can I replace the buttonclick event with a page load event? Is there a way to specify the pageload javasript event as a trigger for the updatepannel?

Posted: Feb 15 at 19:52

View 1 Replies!   View Related
AJAX :: Javascript Not Firing After Asyncronous Postback?
I am trying to use Jquery + prettyPhoto to display images in a gridview that is also in an update panel.

The js scripts work with the images in the gridview up until an asyncronous event happens inside the update panel. At this point the js scripts are "lost". I have researched and tried many different options but none seem to work. I have included the parts of code that matter.

Once the "Add to cart" button is clicked and the asyncronous postback is fired, the images no longer are connected to the prettyPhoto scripts like they were on page_load.

[Code]....

Posted: Sep 08, 2009 03:46 PM

View 8 Replies!   View Related
AJAX :: Postback After Calling A Webservice From JavaScript?
I have a page that calls a webservice from JavaScript using the approach described in this article: [URL]

This is working fine. The problem is when the page causes a postback before the end of the execution of the webservice's method. When that happens, the succeeded callback method never gets called. Does anyone know if there's a workaround to this?

Posted: Mar 23, 2011 03:53 PM

View 2 Replies!   View Related
AJAX :: Postback Creating JavaScript Code?
A have a web page that does an AJAX callback. When the CallBack event is handled, my ASP.NET code generates some JavaScript that is then returned to the browser. The idea is that this JavaScript will then immediately be executed. The reality is that it isn't....

Here is an example of my server code that handles the callback (the JavaScript has been simplified to a single alert):

[Code]....

I've tried using some of the browser DevTools in IE, Firefox and Chrome, but I can't get them to spot changes after an Ajax event...]

Posted: Jan 21, 2011 11:15 AM

View 5 Replies!   View Related
AJAX :: Went Through The Galleries And Samples And Didn't Find It There?
I had someoneshow me an ajax control and nowI can't rememberwhich one it is. I went through the galleries and samples and didn'tfind it there, although I could swear that's where it was...It basically launched a window when youhoveredover or clicked on a line of text.Kind of like a tool tip, but more elaborate, where the text box does a couple of twirls and then presents itself. It has an "x" out in the top right that when clicked returns the window back to the line of text.

Posted: Nov 06, 2009 09:21 PM

View 2 Replies!   View Related
AJAX :: Losing Javascript Events On Async Postback?
I am creating a ASP.Net server control to manage locations. The control is a composite control containing severaltext-boxes,labels, and a link button. I use the AJAX Control Toolkit to provide a modal popup which contains a Bing map. All the Javascript is in its own file and used as an embedded web resource.

The link button is what opens the modal popup. It also needs to call a Javascript function that initializes the Bing map (onclick = "GetMap();"). There are instances when this server control is placed within an Update Panel (and there is no way to avoid this). When in an Update Panel the link button loses its onclick event. I understand that this is because during an async postback the portion of the DOM that defines the content of the Update Panel is thrown out and reinitialized, resulting in the event breaking.When the control is not in an Update Panel everything works as intended.

I have tried registering events on Page.Load and Page.Init, like so:

[Code]....

I have also tried flat out writing the function call to the page:

[Code]....

I have put breakpoints on the lines inside each delegate and they do not get hit. I am not aware of any special way to register events of a composite control's child control or the Page.Load/Page.Init events when being done inside a server control. Is there some special way to register these events? (Note: Both those code blocks above are in myCreateChildControls() method)

Below is the GetMap() Javascript function. As you can see it is pretty straight forward.

[Code]....

Posted: Apr 27, 2010 09:07 PM

View 3 Replies!   View Related
AJAX :: Refreshing Update Panel Through Javascript Postback?
In one of my webpage, I have a parent window where i have a datalist with 10 rows of images. when i click any image a pop up window(child window) opens.

The child window has a form to be filled by user. Once user fills this form, he will press the save button. Once the save button is clicked, the child window should be closed and the datalist(in the update panel) in the parent window should be refreshed.

This is how I am trying to achieve this. On click of the save button a javascript function is being called of the parent window like this: window.opener.refreshDataList();

in the refreshDataList() function I have written the following code:

{
childWindow.close();
__doPostBack('ctl00_ContentPlaceHolder1_UpdatePanel1', '');
}

This works like a charm in Internet Explorer. However in Mozilla and Chrome it doesnt work. While testing this I added an alert statement ind the refreshDataList() function like this..

{
childWindow.close();
alert("Testing");
__doPostBack('ctl00_ContentPlaceHolder1_UpdatePanel1', '');
}

Once I added the alert statement, It started working in both mozilla and chrome.

So I realize that It could be an issue related to focus. I have done window.focus()

but still its not recieving any focus and not working in Mozilla and Chrome.

Posted: Mar 17, 2010 05:00 AM

View 2 Replies!   View Related
AJAX Partial Postback / Dynamic JavaScript Values?
I am working with a user control which is inside an UpdatePanel. The user control uses swfobject to add a flash object to a div in the user control. Part of the functionality of the user control is it allows the user to change 'channel'. The channel is set and handled in the code behind hence the call in the JavaScript below to <%=channel%>.

The problem I have is that when the new channel is saved, the JavaScript code below is still pointing to the old channel. The only way I can fix this is to refresh the page via the code behind, but I'm thinking there must be a better way to do this..

[Code]....

Posted: Jan 20 at 15:53

View 2 Replies!   View Related
Ajax - Wiring Up JavaScript Handlers After A Partial Postback?
I am trying to use LinkButtons with the DefaultButton property of the ASP.NET Panel in an UpdatePanel. I have read and used the various other answers that are around describing the wiring up of the click event so that a full postback is not done instead of a partial postback. When the page loads, I wire up the .click function of the LinkButton so that the DefaultButton property of the ASP.NET panel will work.

This all works fine, until you bring an UpdatePanel into the mix. With an UpdatePanel, if there is a partial postback, the script to wire up the .click function is not called in the partial postback, and hitting enter reverts to causing a full submit of the form rather than triggering the LinkButton.

How can I cause javascript to be executed after a partial postback to re-wire up the .click function of the LinkButton? I have produced a sample page which shows the problem. There are two alerts showing 1) When the code to hook up the .click function is being called, and 2) When the .click function has been called (this only happens when you hit enter in the textbox after the event has been wired up). To test this code, type something in the textbox and hit Enter. The text will be copied to the label control, but "Wiring up Event Click" alert will not be shown. Add another letter, hit enter again, and you'll get a full postback without the text being copied to the label control (as the LinkButton wasn't called). Because that was a full postback, the Wiring Up Event Click event will be called again, and the form will work properly the next time again.

This is being done with ASP.NET 3.5.

Test Case Code:

[Code].....

Posted: Jun 1 10 at 15:43

View 1 Replies!   View Related
AJAX :: Hammering Partial Postback With A Slider And Javascript?
I have a JavaScript slider which calls the follow functions:

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm._doPostBack('ZoomButton1','');

The ZoomButton1 is tied to an UpdatePanel and does a partial postback. In this case, when the Slider is constantly be dragged left and right, the value is changing/updating and JavaScript is hammering the postback extremely fast. It is so fast, the server sometimes but not always reports a pagerequest manager error, I believe.

I know that I can set it to just update my data (updatepanel) on a button_release or a mouse-up.. but occasionally, I still encounter the pagerequest manager error.

Posted: Nov 02, 2010 09:07 PM

View 3 Replies!   View Related
Web Forms :: Why The Method LoadViewState() Is Not Called After The Postback
I can't understand why the method LoadViewState() is not called after the postback in my code below.After label1 cahnges its text the "__VIEWSTATE" hidden field is modified, but LoadViewState() is not called.

[Code]....

Posted: Sep 07, 2010 02:07 PM

View 3 Replies!   View Related
AJAX :: EnableEventValidation / EnablePartialRendering (tue / False) Didn't Work
I have been using gridveiw to show uploaded files after that I have already put the new column to download these files. If I will put EnableEventValidation="true" and EnablePartialRendering="true"(ToolkitScriptManager), it is didn't work and error messages apperar like this:

Server Error in '/POV2' Application. Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page nableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. Source Error:

[Code]....

Stack Trace:

[Code]....

[ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.] System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +173 System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +72 System.Web.UI.WebControls.HiddenField.LoadPostData(String postDataKey, NameValueCollection postCollection) +46 System.Web.UI.WebControls.HiddenField.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +13 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +346 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743

If I will put "false", it is okay, I can download but updatepanel is didn't work. So my page refreshed when I click any events.

Posted: Mar 31, 2010 04:14 AM

View 7 Replies!   View Related
Javascript - How To Return Data After AJAX Postback Back To The Client
I have a simple question - I use update panel with custom server control inside. I call __doPostBack from javascript and RaisePostBackEvent on the server fires (I implement IPostBackEventHandler).This is client to server call. Could I return data back to the client (after this partial postback)? What is the best way to achieve this?

Posted: Feb 4 10 at 14:40

View 2 Replies!   View Related
AJAX :: PageMethods OnSuccess Event Didn't Work In Firefox?
i write a page method and some sort of javascript to work with that method, everything fine in any browser but firefox!

[Code]....

<input id="offcheckcid" type="button" value="بررسی کلوب آی دی" onclick="CheckCloobID('offline');" style="color: Black;"/>
function CheckCloobID(sender) {
var id;
var email;
var button;
id = $get("ctl00_ctl00_cph1_cph1_offcid");
email = $get("ctl00_ctl00_cph1_cph1_offcpe");
button = $get("offcheckcid");
button.value = "کمی تامل نمائید...";
button.disabled = true;
id.disabled = true;
email.disabled = true;
PageMethods.CheckCloobID(id.value, email.value, 'offline', OnSuccess, OnTimeout, OnFailure);
}
function OnSuccess(result) {
var results = result.split("#", 2);
if (results[0] == "Accepted") {
var price = $get("offcut");
price.innerText = "30,000- ریال";
var total = $get("offtotal");
total.innerText = "570,000 ریال";
var button = $get("offcheckcid");
button.value = "تائید شد";
}
else {
alert("...کلوب آی دی و ایمیل محرمانه وارد شده وجود ندارد یا قبلا تخفیف گرفته است");
ActivateButtons();
}
}

the problem: onsuccess event did not work in firefox, no error message displayed in firebug...

Posted: Jul 18, 2010 04:56 AM

View 1 Replies!   View Related
AJAX :: Use JavaScript To Validate Dynamically Created Controls Without Generating Postback?
I have a small form with some static elements that I am able to access with javascript thebring up a popup. 4 textboxes are generated and attached to a updatepanel. I've been trying variousmethods of validating the contols without generating postback.

I found anytime i registered a javascript to the scriptmanager the page must refresh.

Is there anyway it can be done?

Posted: Feb 02, 2010 03:36 AM

View 1 Replies!   View Related
AJAX :: CollapsiblePanel Didn't Show Animation When Deploy On Win2003 Server?
In my ASP.net application i used AJAX Collapsible Panel, its working fine on my local system but after publishing and deploying on win2003 server, panel is in expand mode and dont show animation on click and also on that web form asp menu is not showing submenus. It all happens on clients machines. On server it still somehowshowing some animation.

<asp:ToolkitScriptManager
ID="ToolkitScriptManager1"
runat="server">

[code]...

Posted: Jul 19, 2010 08:59 AM

View 2 Replies!   View Related
JQuery :: Define Function With Name And Called In Javascript?
I have asp.net webpage in that image div should change image when a button is clicked. I want to add fade in and out effect so I use jquery. The code is

[Code]....

But image never is changed. So I think something wrong with ChangeImage().

Posted: Apr 02, 2011 07:57 AM

View 1 Replies!   View Related
.net - Javascript Slash Is Missing When Called In Argument
i am passing a path as an argument in a javascript. for example i am passing a path as c:my documentsuseraa.jpg when registering javascript in client side.

but when calling this in a function say, function js(d) then the slash goes missing..hence the value of 'd' becomes c:mydocumentsuseraa.jpg

Posted: Dec 24 09 at 7:01

View 4 Replies!   View Related
When The Page Is Loading, The Image Gets Really Big, Then Shrinks Down Being Called By The Javascript?
I have an image control that puts user's photo in it. Once it's loaded, I resize it using the javascript.But the thing is, when the page is loading, the image gets really big, then shrinks down being called by the javascript. Is there a way for me to pre-load the image before displaying it? I do'nt want to set the image control's width and height to fixed pixels at this point.

Posted: Feb 16th, 2010, 12:50 AM

View 8 Replies!   View Related
Web Forms :: Display Javascript Confirmation Box Called From Code Behind?
I am trying to display ajs confirmation box from code behind.

[Code]....

[Code]....

Posted: Oct 30, 2009 07:32 AM

View 7 Replies!   View Related
Web Forms :: Executing Javascript Functions Called By RegisterStartupScript?
i think The javascript function called by using RegisterStartupScript or RegisterClientScriptBlock executed after the code in the method is executed.I want to execute the javascript function called by RegisterStartupScript or RegisterClientScriptBlock to be executed before the code in buton click method is executed. For that what should i do?

Posted: Jan 27, 2010 09:40 AM

View 5 Replies!   View Related
MVC :: Can't Reach Controller - Javascript Library And Method Called From View
I have a javascript library and in there i have a method that is called from my view. Here it is:

<li><a href="javascript:void 0" onclick="deleteAll('image', '<%= ViewData["FileGroupId"]%>')"><div><%=GetGlobalResourceObject("default", "Delete_all") %></div><div></div></a></li>
and here is my js code in the javascript library:
var deleteAll = function(module, groupId) {
jConfirm(_deleteConfirmAll, _deleteAll, function(r) {
if (r) {
showProgress();
$.ajax({
cache: false,
type: "POST",
url: _baseUrl + "/" + module + "/deleteall/" + groupId,
success: function(msg) {
if (msg == '0') {
location.href = _baseUrl + '/' + module;
}
else {
jAlert(msg, _errorTitle);
}
hideProgress();
}
});
}
});
}
My problem is that i cant reach my controller. Here is my controller code:
#region common methods
List<.CMS.Core.File> GetList(int groupId)
{
List<CMS.Core.File> list = new List<CMS.Core.File>();
CMS.Core.FileFilter filter = new CMS.Core.FileFilter();
filter.GroupId = groupId;
int res = CMS.Core.File.Search(_connection, filter, ref list);
return list;
}
#endregion
public ActionResult DeleteAll(int groupId)
{
List<CMS.Core.File> list = GetList(groupId);
foreach (File item in list)
{
item.Delete();
}
return Json(list);
}
And at last her is my Index method
public ActionResult Index(int? id)
{
if (Request.IsAjaxRequest())
{
JsonPaging paging = new JsonPaging();
int offset = 0;
int page = 0;
if (!String.IsNullOrEmpty(Request.QueryString["page"]))
{
Int32.TryParse(Request.QueryString["page"], out page);
}
if (page > 0)
{
offset = (page * paging.PageSize) - paging.PageSize;
}
FileFilter filter = new FileFilter();
filter.Deleted = false;
filter.MaxRecords = paging.PageSize;
filter.Offset = offset;
if (!String.IsNullOrEmpty(Request.QueryString["keywords"]))
{
filter.FilterType = FilterTypes.AND;
filter.Name = Request.QueryString["keywords"].ToString();
}
if (!String.IsNullOrEmpty(Request.QueryString["sort"]))
{
filter.OrderBy = Request.QueryString["sort"].ToString();
if (!String.IsNullOrEmpty(Request.QueryString["direction"]))
{
filter.OrderBy = filter.OrderBy + " " + Request.QueryString["direction"].ToString();
}
}
if (id > 0)
{
filter.GroupId = id.Value;
}
List<CMS.Core.File> items = new List<CMS.Core.File>();
int results = CMS.Core.File.Search(_connection, filter, ref items);
foreach (CMS.Core.File current in items)
{
JsonItem item = new JsonItem();
item.Id = current.Id;
item.Name = current.Name;
item.ImageText = current.ImageText;
item.Aperture = current.Aperture;
item.TakenOn = current.TakenOn;
item.Camera = current.Camera;
item.ExposureTime = current.ExposureTime;
item.FocalLenght = current.FocalLenght;
item.Tags = current.Tags;
item.Url = current.Url;
item["Active"] = current.Active.ToString();
item["Created"] = current.Created.ToString();
paging.Items.Add(item);
}
return Json(paging, JsonRequestBehavior.AllowGet);
}
else
{
ViewData["FileGroupId"] = id;
return View();
}
}

Posted: Jul 23, 2010 03:28 PM

View 2 Replies!   View Related
Web Forms :: How To Perform Click (postback From JavaScript) On The Button From JavaScript In Opera
i have a TextBox and Button.in Codebehind if the page i added following, to register my script:

protected void Page_PreRender(object sender, EventArgs e) {
Page.ClientScript.RegisterStartupScript(Page.GetType(), "textBoxSet", "textBoxSet(document.getElementById('" + QueryTextBox.ClientID + "'));", true);

[code]....

but still, Opera has no affect of executing this script.so, how to perform click on the button, i mean to perform a postback from JavaScript with the target of the searchButton ?

Posted: Sep 03, 2009 06:12 PM

View 2 Replies!   View Related
AJAX :: Server Side Event Doesn't Get Called If Ajax And OnClientclick Added?
Below is my scenario:

Scenario:

1. I have one AJAX panel on my page which contains few textboxes, requiredfieldvalidators for them and one server side button.

2. The button has onclientclick and onclick events registered.

3. Onclientclick event calls a simple javascript function which does some validation of form data and returns true or false. (OnClientClick="return ValidatePage();")

4. Onclick event calls some server side implementation.

Behavior:

1. When a button is clicked, requiredfieldvalidators (only checks if data is entered) gets fired.

2. When data is entered in the textboxes, javascript function 'ValidatePage()' (checks if
VALID data is entered) gets fired.

3. When ValidatePage() returns false, server side event doesn't get fired.(Which is desired behavior)

4. When ValidatePage() returns true, still server side event doesn't get fired.(Which is not desired behavior)

5. When OnclientClick event registration is removed, the server side event gets fired through AJAX after entering data in the textboxes.

6. When button is moved out of the AJAX panel, both, the javascript function and the server side event gets fired but normal postback occurs.

Desired behavior:

1. First requiredfieldvalidators should get fired.

2. Then 'ValidatePage()' should get fired. If it returns false, it should restrict server side call. If it returns true, server side event should get called through AJAX.

Posted: Oct 29, 2009 06:59 AM

View 8 Replies!   View Related
Forms Data Controls :: Capture Value Of Javascript Function Called By GridView Linkbutton Click?
i have gridview with linkbutton.when i click linkbutton it should call javascript function which returns value would be input for database functions. how do i capture javascript function retun value(i am using Registerclientscriptblock)? and that should be input for database function. Inshort i need to call two function from link button click - one javascript function,one ado.net function which will update value in database. output of javascript function will be input for database function.

function Getlogitudelantitude(address)
{
return "35.3434343,-74.334343"
}
Linkbutton_click(object sender,Eventargs e)
{
register javascript function .. which should return value
string s = "35.34343,-74.334343"
then call database function(s) - does database operation
}
}

Posted: Oct 22, 2010 11:12 PM

View 2 Replies!   View Related
Forms Data Controls :: Javascript Function Called On Click Of Treeview Is Not Working In Mozilla?
I want postback on click of treeview node .So i called a javascript function to do the same. I wrote the following ..On page load:

[Code]....

This is working fine in IE. But it is not working in mozilla and google chrome.

[Code]....

Posted: Apr 29, 2010 04:17 AM

View 4 Replies!   View Related
Using Linq To Sql Classes With A Couple Of Tables, One Called Personal And The Other Called Business?
Here's my little problem that's looking for a solution. I'm using Linq to Sql classes with a couple of tables, one called personal and the other called business. A few tables in personal are firstname, lastname, address, etc. Now instead of using the details view and connecting to the database, I want to use a wizard that when the submit button is clicked, it will save the text to the tables. How would I code the Wizard_FinishButtonClick behind code?

Posted: Jun 02, 2009 03:22 PM

View 2 Replies!   View Related
Javascript - Postback And Get Value From Html In That Postback?
I have a js function

function(id){
// do a postback here and get the id on the server side
}

I need to send the id to the server, how could I do this?

any way will do, using additional/hidden controls anything

Posted: Feb 4 at 14:58

View 1 Replies!   View Related
Forms Data Controls ::Postback Of Page Using JavaScript Postback's Slow Down The Page?
I'm at my wits end on this one looked/Searched/Played/Experimented and I need your help if you can.This page is going to beprimarily used on a mobile device using Win Mobile 5 Need to Accomplish:Prevent Postback(serverside) of Page using JavaScript (Postback's slow down the page on mobile device)

[code]...

Posted: Sep 22, 2010 06:24 PM

View 1 Replies!   View Related
AJAX :: How To See When DataBind Is Called
I have a user control with cascading dropdownlists. When Ipopulate thecontrols in the Page_Load event, the second dropdownlist has duplicate entries. These controls are inside AJAX UpdatePanelsand I need to find out when DataBind is called on the second dropdownlist to see why it is being called twice.

I am using a SqlDataSource with a ControlParameter to populate the seconddropdownlist, not doing it through the code behind.

Is there a window in Visual Studio 2008 that will let me see when DataBind is being called?

Posted: Dec 06, 2010 11:12 AM

View 4 Replies!   View Related
AJAX :: Webservice Not Being Called
I am new to ASP.NET (2 months) and my very first assignment is to create a website for a municipality. Purchasing as much reading material as possible, I got started and after some time, I have a decent website (coded in C#) that is ready to be internally tested on the departmental webserver. The Web server is running IIS 7 and the pages were developed with Visual Studio 2010. On the main default page, I wanted to implement a slide show using the AJAXControlToolkit which I installed. I watched the ASP.net tutorial [URL] and literally coded my slide show verbatim. I try to launch my slideshow within my default.aspx page and absolutely nothing happens. The steps that I took are

1. Created a webservice (SlidesService.asmx) which generated a code behind file (SlidesService.cs).

2.I created the web method GetSlides()containing a 22 element array which I place in the code behind file.

3.Implement the ToolkitScriptManagerestablishing my image control.

4. Defined my Previous, Play and Next buttons.

5.Implementedmy SlideShowExtender providing my SlideShowServicePath and SlideShowServiceMethod.

Assumptions: In doing all of the above, I noticed that the SlidesService.asmx file needs no code (as I placed all code within the codebehind file). The SlidesService.cs code behind file should reside in the App_Code folder whereas the the SlidesService.asmx file can remain in the root folder. No Button e.g Button_Click needs to be attached to the code behind source file. If I have conveyed my steps properly, can anyone shed some light on why when clicking the play button, nothing happens? Code is listed below.

[Code]....

SlidesService.asmx - code
<%@ WebService Language="C#" CodeBehind="~/App_Code/SlidesService.cs" Class="SlidesService" %>

Posted: Feb 24, 2011 07:31 PM

View 2 Replies!   View Related
AJAX :: How To Prevent Master Page Postback When Update Panel Asynchronous Postback Happened
When an asynchronous postback happened inside update panel, another postback happens also for MasterPagenot only update panel embedded page .I want to prevent this MasterPage postback . is this possible ?think like i have a MasterPage and another page which is test.aspx which is content page of MasterPagei have update panel at test.aspxwhen asynchronous postback happens at this test.aspx update panel it also loads
MasterPage Page_Loadi want to prevent this (it should not also load MasterPage Page_Load)

Posted: Oct 15, 2010 12:49 PM

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