Hi,
When I set EnablePartialRendering = false it works.
But I want EnablePartialRendering = true.
How to over come this.
Page.ClientScript.RegisterClientScriptBlock(Page.G etType(), "Move", "scrollToXY(10,10);", true);
Thanks in advance
4 3463 Frinavale 9,735
Recognized Expert Moderator Expert
Hi,
When I set EnablePartialRendering = false it works.
But I want EnablePartialRendering = true.
How to over come this.
Page.ClientScript.RegisterClientScriptBlock(Page.G etType(), "Move", "scrollToXY(10,10);", true);
Thanks in advance
What is the error you're getting?
Are you having problems registering your script in the page?
Consider using ScriptManager.RegisterClientScriptBlock instead.....
Could you please provide more information about your problem.
Thanks
-Frinny
What is the error you're getting?
Are you having problems registering your script in the page?
Consider using ScriptManager.RegisterClientScriptBlock instead.....
Could you please provide more information about your problem.
Thanks
-Frinny
No I didn't get any error on registering thescript in the page.
When I set PartialPageRendering = false it works fine.
But when i set it to PartialPageRendering = true it did't call the script and didn't throw any error.
Through breakpoint i chencked it called correctly.
I heard that when i set PartialPageRendering = false it renders only partial page.
So the script didn't load in the page. So the script can't be called.
Thanks
Frinavale 9,735
Recognized Expert Moderator Expert
No I didn't get any error on registering thescript in the page.
When I set PartialPageRendering = false it works fine.
But when i set it to PartialPageRendering = true it did't call the script and didn't throw any error.
Through breakpoint i chencked it called correctly.
I heard that when i set PartialPageRendering = false it renders only partial page.
So the script didn't load in the page. So the script can't be called.
Thanks
As I stated before, have you looked into using ScriptManager.RegisterClientScriptBlock instead of the Page.RegisterClientScriptBlock?
JavaScript doesn't work after a partial page update has occurred. In order to get around this the ScriptManager and ScriptManagerProxy classes were created. These allow you to re-register your JavaScript when the partial page update occurs so that it can still be accessed by the page.
-Frinny
Hi Frinavale,
I have put like this in C#
ScriptManager.RegisterClientScriptBlock(this, Page.GetType(), "Scroll", "ScrollToPosition();", true);
and the Script is
<script language = "javascript" type = "text/javascript">
function ScrollToPosition()
{
window.scrollTo(10,10);
}
</script>
The firefox grives an error message as ScrollToPosition is not defined but is scrolls.
In IE it gives an errormessage that Microsoft JScript runtime error: Object expected and it points to the script function ScrollToPosition
When I called the function from onClientClick it works fine on both the browsers.
Will you tell me what the wrong in thisScriptManager.RegisterClientScriptBlock(this, Page.GetType(), "Scroll", "ScrollToPosition();", true);
and also I tried like this ScriptManager.RegisterClientScriptBlock(this, Page.GetType(), "Scroll", "ScrollToPosition();", true);
Thanks
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Sue |
last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided
to improve character checking on my project. In my project I only had
to do very basic validation. Therefore, I only had one...
|
by: JoeK |
last post by:
Hey all,
I am automating a web page from Visual Foxpro. I can control all the
textboxes, radio buttons, and command buttons using syntax such as:
...
|
by: Randell D. |
last post by:
Folks,
I'm sure this can be done legally, and not thru tricks of the trade - I
hope someone can help.
I'm writing a 'tool' (a function) which can be used generically in any
of my projects. ...
|
by: John |
last post by:
Hi all,
This really is quite an urgent matter.
I have a page with multiple, dynamically-loaded user controls and when a
user clicks on a button, the whole form is submitted. Now at this stage...
|
by: C.Joseph Drayton |
last post by:
I have a problem that I am hoping someone can help me with.
First let me describe the problem. I have an HTML form that in one
field has an onBlur call to a JavaScript function. When you exit the...
| |
by: settyv |
last post by:
Hi,
Below is the Javascript function that am trying to call from asp:Button
control.
<script language="javascript">
function ValidateDate(fromDate,toDate)
{
var fromDate=new Date();
|
by: yangsuli |
last post by:
i want to creat a link
when somebody click the link
the php script calls a function,then display itself :)
i have tried
<a href=<? funtion(); echo=$_server ?>text</a>
but it will call the...
|
by: Fabio Mastria |
last post by:
My application has to call a webpage with some hidden field, fill their
values with some parameters and then call the submit to the form which has
the action property set to a page of another web...
|
by: shahidrasul |
last post by:
i have two problem
1. how to call a javascript function from form page and also how to call c# function from javascript because when user click on button i want to validate field of form and if...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |