Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Wednesday, March 28, 2012

Link inside a draghandles template

Is it possible to access a link or a textbox inside a draghandle's template?

I want all the controls inside the draghandle to be dragable and also that users could click on these controls inside the draghandle

talking about ReorderList's DragHandle..

I"m trying to do a similar thing. Originally, I wanted to be able to drag any portion of a ReorderItem to a different position. The problem I ran into is that if you don't declare a position for the DragHandle, you can drag from any place on the ReorderItem BUT this means you cannot click on any controls that are contained in the ReorderItem, making them all useless. The control thinks that if you click ANYWHERE, you're trying to drag it, so the controls can never be used.

So, to remedy this problem, I thought to do exactly what you're doing. I added a <DragHandle> to the left side which contains a Label; this Label was to hold the sequence number of the ReorderItems (so the first item would have a 1, the second would contain a 2, etc), but like you I cannot access this control from the code behind when the Reorder event fires.


your problem seems diferent than mine. I don't have any problems accesing controls in the code behind. I'm trying to figure out how to make some parts of the draghandle dragable and some of them "clickable". I guess i need to construct some <div> element consisting of several other <div> elements and put a draghandle inside one of them. But here is another problem: you cannot place the draghandle anywhere you like, just four possitions. So i cannot put it inside a particular <div> element

I guess i need to think another way to do it

Wednesday, March 21, 2012

Loading the Ajax Toolkit Page with IFrame into Php-website: Access denied

How to load the Ajax Toolkit Page (my Chat) with IFrame into Php-website?

Code for an illustration:

1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">2<html xmlns="http://www.w3.org/1999/xhtml" >3<head>4<title>Untitled Page</title>5</head>6<body>7<iframe id="iframe1" width="100%" height="1000" frameborder="0" src="http://ajax.asp.net/ajaxtoolkit/Accordion/Accordion.aspx" marginwidth="0" marginheight="0" scrolling="no" />8</body>9</html>10

There is nothing elase that you have to do.

Since PHP is in-line with HTML, just close your PHP and specify the HTML iframe tage.

As long as the iframe page is a complete AJAX Toolkit page that works stand-alone, you should be fine.

Loading with animation

Hey,

Because I need to load thousands of records on to GridView so when I access to this page, it takes about 20 seconds, I wonder that how can I implement it with Ajax that: an animation ( image) will be loaded at the center of my page, the rest of page will be silver, when the page is loaded successfully, animation will be disappeared and the page changed to white.

Anybody knows how to implement it, could you please help me?

Thanks,

Joesy

Hi,

you can use the UpdateProgress control or the PageRequestManager class. Take a look at the bottom of this page for an example:http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass/default.aspx.

Grz, Kris.


Hi Kris,

Thanks, I will try it.

Grz, Joesy


This may help.http://forums.asp.net/thread/1622218.aspx

It involves hiding or displaying a specific DIV until the page has loaded using the BODY tags onload event handler.

Here's another situation where it uses an UpdatePanel and an UpdateeProgress control:http://forums.asp.net/thread/1618788.aspx

Cheers,
Al


Hey Alharding,

Thanks for your advices,

Grz, Joesy

Localize TextBoxWatermarkExtender

Hi All,

How are we meant to localize the TextBoxWatermarkExtender.WatermarkText? I have a control in a detailview and so have to access it with FindControl in the cs which means that the javascript is written when the control is found so the default is already set. I do not need dynamic control over the text but the ability to localize the control before rendering would be useful.

But on the site note, how would I change the text of a control that is already rendered? I can of course change the control but it's the javascript that is produced as a result of rendering that I am having trouble over coming.

Thanks

Michael

Give this a try:

From:http://www.asp.net/AJAX/Control-Toolkit/Live/Walkthrough/OtherNeatStuff.aspx:

Using data binding to specify Extender properties

If you want to initialize Extender instances dynamically from data (instead of with server-side code), this is now supported. The example below demonstrates setting the "WatermarkText" property of a TextBoxWatermark from the "WatermarkTextField" value of a data source. A working example of Extender data binding within a Repeater can be found in the DataBinding.aspx automated test (in the ToolkitTests folder).

 <ajaxToolkit:TextBoxWatermarkExtender ID="TBWE" runat="server" TargetControlID="TextBox1"WatermarkText='<%# Eval("WatermarkTextField") %>' />
-Damien

Hi,

Thanks for the quick reply.

The information you provided was useful however the data I am trying to access is the global resources. I would normally use <%=Resources.resources.strings.WatermarkTextField %> however when I try to use this the string in the string on page is the exact string I wish to use. So how do I access the localization strings?

Michael


Can you use something like: "<%$ Resources:resources:strings, WaterMarkTextField %>" (not exactly sure of the syntax), see http://msdn.microsoft.com/msdnmag/issues/06/08/BasicInstincts/#S3 for more info.

-Damien


Hi Damien,

You were almost spot on with it. The Syntax was "<%$ Resources:resources.strings, WaterMarkTextField %>". The only difference was the second colon was a dot.

Many thanks for your help.

Michael