ラベル control の投稿を表示しています。 すべての投稿を表示
ラベル control の投稿を表示しています。 すべての投稿を表示

2012年3月28日水曜日

Reset a CascadingDropDown control

Can anyone tell me how to reset a group of drop down lists that are grouped together in a CCDD control? I've tried calling dropDownList1.Items.Clear(); but that's not working.

Thanks!

Jason

not sure on this one... but I think you need to call _onParentChange() on the first CascadingDropDownBehavior object... I think you can just set the ID in the CascadingDropDownProperties and then use $object('long_generated_id')._onParentChange( false );

Sorry, but I'm not following... I can't find a method or event _onParentChange for either the CCDD or the DDL itself. I'm also not sure what you mean by $object("long_generated_id"). Where to I get this ID?

Can you provide an example?

Thanks!


Hi Jason,

Jaykul's talking about setting the ID in your CascadingDropDownProperties instance which will cause an ID to be used when it is rendered to the client. However, the ID you use will get mangled and include all the names of its parent naming containers. This mangled ID is what Jaykul was referring to by "long_generated_id." See the MSDN docs onnaming containers for more information. I think one of the easiest ways to find out the long version of the name is to turn tracing on and find it in the control tree.

Thanks,
Ted
$get("<%=ddlCountry.ClientID%>").selectedIndex = 0;

$get("<%=ddlOffice.ClientID%>").selectedIndex = 0;

$get("<%=ddlSalePerson.ClientID%>").selectedIndex = 0;

$find("<%=CascadingDropDown1.ClientID%>")._onParentChange(false);

Resizable Control Extender

I have a Panel with scrollbars set to auto, a TreeView control with enough nodes to trigger the scroll bars,

and a Resizable Control Extender attached to the Panel.

The Resizable Control Extender will work perfectly as long as you don't scroll the Tree.

If you scroll the Tree the Handle will move vertically by the amount of the Tree scroll.

If you scroll too far the handle will disapear from the screen leaving you without a way to resize the Panel.

Does anyone know of a way to keep the handle in it's original postion?

Thanks,

Larry

Can you post your code?? Even I am stuck on a similar issue...may be we might be able to help each other.

Karamchand

Resizable Control bug?

The following code:

_lining.style.backgroundImage = 'url(invalid)'; // Keeps IE from ignoring the content-free element

in ResizableControlBehavior class is not working well with IE6. The image is being requested by browser every event the control fires (mousedown, mouseup, mousemove etc.). Check out your browser's status bar while resizing the control (watch it carefully as the text blinks very quickly) or use Nikhil's Web Development Helper with http logging on to see the requests.

There are many ways to fix this. I use solid black background with 20% opacity for additional effect.

Thanks for reporting this. Could you file an issue with this information atwww.codeplex.com?

Choose "Atlas Control Toolkit" then "Issues".

Thanks!

Resizable control as part of composite control

I'd like to use the ASP.NET AJAX Resizable control in my composite control. My control should provide all its images, JavaScript, and CSS as Embedded Resources, so that the users of it don't need to bother about these files. This includes the HandleGrip.png image that comes with the Resizable control. Unfortunately, the image use is defined in the css of the Resizable control, like this:

.handleText
{
width:16px;
height:16px;
background-image:url(images/HandleGrip.png);
overflow:hidden;
cursor:se-resize;
}

How can I let anyone use my control without giving them a copy of HandleGrip.png (to put somewhere on their website, while it is already embedded in my DLL)?

Hi,

You may refer to the the sample in AjaxControlToolkit. For instance:

.ajax__slider_h_rail {position:relative;background:url(<%=WebResource("AjaxControlToolkit.Slider.Images.slider_h_rail.gif")%>) repeat-x;height:22px;}


Indeed.

I triedbackground-image. Visual Studio did not let me (saying'url(<%=WebResource(' is not a valid value for the 'background-image' property.). After I read your comment I realized I could set the background-image by means of specifyingbackground.

Thanks.

ResizableControlExtender does not resize image??

hi,

guys

ResizableControlExtender control does not resize the image.does this control not support the image control?

guide me.

thanks in advance.

Miss Sheetal,

Put your image control inside a panel and set the TargetControlID of ResizableControlExtender to the Panel's ID.


I've tried as u said,but it resizes panel not image!!!!!!!!! just check out this code:

<asp:Panel ID="panel1" BorderColor="black" BorderWidth="5" runat="server" Height="200">
<img id="img1" src="http://pics.10026.com/?src=images/untitled5.bmp" alt="sd" runat="server" />
</asp:Panel
<cc1:ResizableControlExtender ID="resiable" HandleCssClass="handleText" ResizableCssClass="resizingImage" HandleOffsetX="10" HandleOffsetY="20" runat="server" TargetControlID="panel1"></cc1:ResizableControlExtender>

<Script language="text/javascript">

.handleText
{
width:16px;
height:16px;
background-image:url(images/HandleGrip.png);
overflow:hidden;
cursor:se-resize;
}

.resizingImage
{
padding:0px;
border-style:solid;
border-width:3px;
border-color:#B4D35D;
}

</Script>


You have not specified the Client Side Javascripts that will actually resize the image. Watch thetutorial video on how to do that.


Thanks Buddy!!!!!!!!!!!!!

It Really helps me. Thanx for immediate reply.


Then please mark my previous post as the answer.

ResizableControlExtender: Allowing only horizontal resizing

Hi; I have a ResizableControlExtender control in my page and I'd like to be able to resize it only in x direction (unlike the one in this forum input text control)

Thanks

Any relations to this code peace?:

<scripttype="text/javascript">
function OnClientClickGrow () {
var rcp = $find('ResizableControlBehavior1');
var size = rcp.get_Size();
rcp.set_Size( { width: size.width*2, height: size.height*2 } );
returnfalse;
}
</script>

Just set the ResizableControlExtender's MinimumHeight and MaximumHeight to the same value.

Joe


:) I've found out but u were faster :)

Thanks...

MinimumHeight="500" MaximumHeight="500"

ResizableControlExtender resize the vertical (height) only. EASY ONE!

Hey.. I got an easy one for yall..

I am using the resizablecontrolextender for a panel control. I want the client to have the ablility to resize the height of the box but NOT the width.

This works in Firefox, but not in IE 7 .. anyone got an idea? NO WIDTH!!

"ResizableControlExtender1" runat="server" TargetControlID="thePanel" MinimumWidth="-1" MaximumWidth="-1" MaximumHeight="400" MinimumHeight="100" HandleCssClass="handle" ResizableCssClass="onresize" HandleOffsetX="-300" >

Set MaximumWidth=MinimumWidth=200px (or whatever).

David Anson:

Set MaximumWidth=MinimumWidth=200px (or whatever).

Thatdoes work, but I want my resizable panel inside a div that expandshorizontally (liquid) with the window. The Control itself can beexpanded by the browser window size. An example would be like howoutlook separates emails (in a grid) above, and email details below.You can change the vertical size of the two boxes, but not make themsmaller than the window.

Essentially, I need the equivalent of minimumwidth="100%"


Since I really really want to figure this out I am providing an example to see if I can explain this problem better.

Here is a simple code example to illustrate:

<body>
<form id="form1" runat="server">
<style type="text/css">

.handle { background:Black; width:20px; height:20px; }

</style>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div id="topDiv" runat="server" style="background:Blue; height:100px; display:block; width:100%;">
Content is in here.
</div
<div id="bottomDiv" runat="server" style="background:Red; height:200px;">
Some more content in here as well.
</div
<ajaxToolkit:ResizableControlExtender ID="extender" runat="server"
TargetControlID="topDiv"
HandleCssClass="handle"
MinimumHeight="100"
MaximumHeight="500">
</ajaxToolkit:ResizableControlExtender>

</form>
</body>
 
NOTICE: Both Divs expand to the size of the browser window. I just want to be able to resize the top Div without the ability to change the width. Ideas? Help! 

Since apparently this wasn't so easy I had to figure out a solution for myself. I thought I'd share:

<style type="text/css"> .topRow { overflow:hidden; display:block; background-color:#e6e6de; border:solid 1px black; } .innerTopRow { position:relative; top:0; left:0; right:0; bottom:0; height:93%; overflow:auto; } div.bottomRow { position:fixed; top:0px; bottom:0px; right:20px; left:212px; background:Green; overflow:auto; border:solid 1px black; } .handleTop { width:2000px; height:5px; background:#e6e6de; border-top:solid 1px black; border-bottom:solid 1px black; overflow:hidden; cursor:n-resize; } </style> <asp:ScriptManager ID="ScriptManager" runat="server" /> <asp:Panel id="topRowPanel" runat="server" CssClass="topRow"> <div class="innerTopRow"> <asp:ContentPlaceHolder ID="topRowContent" runat="server"></asp:ContentPlaceHolder> </div> </asp:Panel> <div ID="bottomRowPanel" class="bottomRow"> <asp:ContentPlaceHolder ID="bottomRowContent" runat="server"></asp:ContentPlaceHolder> </div> <script type="text/javascript"> function OnClientResizeText(sender, eventArgs) { var e = sender.get_element(); e.style.width = ''; $get("bottomRowPanel").style.top = e.clientHeight + 105; } </script> <ajaxToolkit:ResizableControlExtender ID="ResizableControlExtender" runat="server" TargetControlID="topRowPanel" HandleCssClass="handleTop" MinimumHeight="130" MinimumWidth="2000" MaximumWidth="2000" MaximumHeight="500" OnClientResizing="OnClientResizeText" HandleOffsetX="-1" />

Resizing Tab Control to fit contained controls

Hi all,

I must be missing something, but I am having a problem with getting my tab control to fit around all the contained controls. What I am doing is adding some controls during runtime and trying to get them to fit within the tab contained area. So for example:


I have a tab control that contains functionality to search by attribute from a data table. So there are 2 combo boxes, a text box, and a button. When the user selects a value from the combo boxes and enters a value in the text box, then they can press find. When they press find, I set the datasource on a grid to reflect this query and display the grid. The problem is that my grid is being displayed outside of the colored area of my tab control. I am having this same difficulty when I add an accordion of grids to another tab.

I would appreciate any help someone can give me on this subject. I have tried changing my style sheet to include padding settings, but that didn't seem to work (though I may have not set something correctly there).

Thanks in advance.

Hello all,

I recently made a post, but I can't seem to find it now. So sorry for the redundancy of this question.

I have a tab control that I am dynamically adding an accordion to with grids inside each level of the accordion. My problem is that my tab control does not visiby resize to contain the controls that I am dynamically adding to it. Can someone give me an idea on what I might can do to force the tab to redraw to visibly contain these controls? Please tell me if this doesn't describe the problem well enough and I will try to do a better job.

Thanks,
Lee

Resizing the Ajax ResizableControlExtender durning the OnLoad event

I'm having a problem with the Ajax ResizableControlExtender.

The control is around an asp panel, which is around a gridview. The gridview is really wide, and I need the headers to stay at the top when scrolling down. That's working just fine.

I have a body onresize javascript event that resizes the ResizableControlExtender to fit better on the screen whenever the screen is resized.

What I need to do is have the resize event fire on the "OnLoad" event.

But at that time the ResizableControlExtender has not been initialized (or so I suppose) and is undefined at that time.

Is there a way to resize the ResizableControlExtender to the current window size in the page load event?

Thanks.

Chuck Snyder

Hi Chuck,

Based on my understanding, the pageLoad method is fired after all extenders on the page have been initialized. But if it doesn't work with you, please try to use window.setTimeout method to invoke the resize method in pageLoad, so that it will be called asynchronized at later.

For instance:

function pageLoad() { window.setTimeout(resize, 1000); }

ResolveUrl equivalent from web service

Hi,I need to resolve a relative URL (eg "~/path/to/file") from within a web service. The only way I know how is using Control.ResolveUrl (or ResolveClientUrl) but obviously neither of these are available from outwith a control context. I've had a look with Reflector at what goes on in those methods and it all uses internal classes so I don't know how I can emulate it.Any ideas? I'm sure theres a method for this somewhere I just need it pointed out!CheersRory

try:

HttpContext.Current.Server.MapPath("~") + "/App_Data/TestFile.jpg", ImageFormat.Jpeg);


Thanks for the reply but I don't see how thats going to help me.

Maybe I wasn't clear enough but I need a Url I can return to the browser. ie From "~/path/to/file" I want to get "/MyApp/path/to/file"


sorry, not much of client side guy myself. I thought you were trying to resolve ~ in a web service to a real path

2012年3月26日月曜日

Response.Redirect cannot be called in a page callback error message.

Hi. I'm using the Dundas Chart Controls in VS 2005. These controls are built utilizing AJAX. I have a basic page with a dundas chart control containing a funnel chart. The funnel contains Quotes, Sales Orders and Invoices. When the user clicks on the control, I want to determine whether they clicked on Quotes, Sales Orders or Invoices and transfer to the appropriate Details Page. I've got the code working to determine which transaction type they clicked on; but, I get the "Response.Redirect cannot be called in a page callback." error when the page tries to redirect. Note: I get a similar issue if I try server.transfer.

Suggestions?

Here's my code:

Dim hitTestResultAs Dundas.Charting.WebControl.HitTestResult = Chart1.HitTest(e.X, e.Y)If Not (hitTestResultIs Nothing)Then Dim clickedAs Dundas.Charting.WebControl.DataPoint = hitTestResult.Series.Points(hitTestResult.PointIndex)Select Case hitTestResult.PointIndexCase 0 Response.Redirect("COQuotes.aspx")Case 1 Response.Redirect("COOrders.aspx")Case 2 Response.Redirect("COOrders.aspx")End Select End If

Since it's a partial postback that is occuring, you can't use Response.Redirect. You need to do a full postback in order to redirect or use a different method. See the last message in this post:http://forums.asp.net/t/1165851.aspx

-Damien


I have no control over the callback. It is being executed by the Dundas Control. I tried implementing the code with the RegisterClientScript, as below. But, nothing happens...

Dim hitTestResultAs Dundas.Charting.WebControl.HitTestResult = Chart1.HitTest(e.X, e.Y)If Not (hitTestResultIs Nothing)Then Dim clickedAs Dundas.Charting.WebControl.DataPoint = hitTestResult.Series.Points(hitTestResult.PointIndex)Select Case hitTestResult.PointIndexCase 0 clientRedirect("COQuotes.aspx")Case 1 clientRedirect("COOrders.aspx")Case 2 clientRedirect("COOrders.aspx")End SelectSub clientRedirect(ByVal URL)Dim jScriptAs String jScript =String.Format("document.location.href ='{0}');", URL) ClientScript.RegisterClientScriptBlock(Page.GetType(), "redirect", jScript,True)End Sub


GiveRegisterStartupScript a try. Seehttp://blogs.ittoolbox.com/c/coding/archives/registerclientscriptblock-and-registerstartupscript-17321 for some more info.

-Damien


Tried RegisterStartupScript, still nothing happens.

Jennifer


Hi,

I'm not familiar with dundas chart but is there no way to setup a href on a chart element during rendering? I would have thought this would be a standard feature.

Back to your Response.Redirect problem. When you get a response from the callback can you control the client-side callback function? If so you could use the cookie method as in the last post. If you have no control over the client-side callback function I very much doubt your going to be able to add the functionality you require.

One minor point, if your re-directing anyway whay do you need to use ajax, you could do a page post back when clicking the chart, do your logic and then redirect. To the user the behavior would seem exactly the same as your moving to a different page anyway.

Cheers Si


You won't be able to use Response.Redirect() or Server.Transfer() in a callback, check if the control has a client event you can use instead, if that event exists you could use window.location.replace("OtherPage.aspx"); using JavaScript from the client to move to another page.

restarting the autocomplete extender?

hi everyone,

I have an autocomplete textbox and detailsview control inside of update panel with partial rendering enabled. When I use the autocomplete control first the time and click on the search button, the detailsview control loads the data and displays it.

But when delete the textbox and start typing again, it no longer autocompletes. Does this work or is there something wrong with my code.

thanks,

gavin

Code Behind

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Lookup : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void ButtonLookup_Click(object sender, EventArgs e)
{
DataSet1TableAdapters.StaffTableAdapter TAStaff = new DataSet1TableAdapters.StaffTableAdapter();

DetailsView.DataSource = TAStaff.GetStaffInfoByName(SearchKey.Text);
DetailsView.DataBind();
DetailsView.Visible = true;
}
}

HTML Page

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Lookup.aspx.cs" Inherits="Lookup" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<atlas:ScriptManager runat="server" EnablePartialRendering="true" ID="scriptManager">
</atlas:ScriptManager>
<style type="text/css">
body { font: 11pt Trebuchet MS;
font-color: #000000;
padding-top: 72px;
text-align: center }

.text { font: 8pt Trebuchet MS }
</style>

</head>

<body>
<form id="Form1" action="" runat="server">

<atlas:UpdatePanel ID="Panel2" Mode="Always" runat="server">
<ContentTemplate
<div>
Search for
<asp:TextBox ID="SearchKey" runat="server"></asp:TextBox>
<asp:Button ID="ButtonLookup" runat="server" Text="Lookup" OnClick="ButtonLookup_Click" />

</div>
<hr style='width: 300px'/
<asp:DetailsView ID="DetailsView" runat="server" Height="196px" Width="323px">
</asp:DetailsView>
</ContentTemplate>
</atlas:UpdatePanel
</form>

<div id="completionList"></div>
<div>
<span id="Results">Here's some other text that shouldn't refresh.</span></div
<script type="text/javascript">
function DoSearch()
{
var SrchElem = document.getElementById("SearchKey");
Samples.AspNet.HelloWorldService.HelloWorld(SrchElem.value,
OnRequestComplete);
}

function OnRequestComplete(result)
{
var RsltElem = document.getElementById("Results");
RsltElem.innerHTML = result;
}

</script
<script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<components>
<textBox id="SearchKey">
<behaviors>
<autoComplete
completionList="completionList"
serviceURL="AutoCompleteService.asmx"
serviceMethod="GetWordList"
minimumPrefixLength="1"
completionSetCount="15"
completionInterval="500" />
</behaviors>
</textBox>
</components>
</page>
</script>
</body>
</htmlHi gfun,

The AutoCompleteExtender isn't part of the Toolkit, so you'll have better luck asking this question in theAJAX UI forum.

Thanks,
Ted

Restricting Dates in an AJAX Calendar

I need to build some logic into my ajax calendar control to prevent the user from entering a date that is less than today's date. I have two text boxes with one called SDate and another called FDate. Each of these text boxes have AJAX calendar extenders attached. So i am trying to figure out when the user clicks the text box, they can only select a date from the AJAX calendar that occurs from today's date onwards. The previous dates should be unselectable.

I thought the follwing code would work, but it seems it does not, as the AJAX calendar control doesn't seem to have the DayRender feature of the full .NET calendar.

ProtectedSub CEStartDate_DayRender(ByVal senderAsObject,ByVal eAs DayRenderEventArgs)

If e.Day.[Date] < Today()Then

e.Day.IsSelectable =False

Else

e.Day.IsSelectable =True

EndIf

EndSub

Any thoughts??

Hi Lochview,

Yes , we can keep the select date in within boundies when we use Calendar but not CalendarExtender(Ajax control). Based on the research of its source code, we can find that CalendarExtender generated all on the client using Javascript and we can control less on the server side. So unfortunately, we cannot achieve what you want by using any direct properties or functions unless we modify its source code. Below is the code snippet which is used to generate its days.

_buildDays : function() {
/// <summary>
/// Builds a "days of the month" view for the calendar
/// </summary>

var dtf = Sys.CultureInfo.CurrentCulture.dateTimeFormat;

this._days = $common.createElementFromTemplate({
nodeName : "div",
cssClasses : [ "ajax__calendar_days" ]
}, this._body);
this._modes["days"] = this._days;

this._daysTable = $common.createElementFromTemplate({
nodeName : "table",
properties : {
cellPadding : 0,
cellSpacing : 0,
border : 0,
style : { margin : "auto" }
}
}, this._days);

this._daysTableHeader = $common.createElementFromTemplate({ nodeName : "thead" }, this._daysTable);
this._daysTableHeaderRow = $common.createElementFromTemplate({ nodeName : "tr" }, this._daysTableHeader);
this._daysBody = $common.createElementFromTemplate({ nodeName: "tbody" }, this._daysTable);

for (var i = 0; i < 7; i++) {
var dayCell = $common.createElementFromTemplate({ nodeName : "td" }, this._daysTableHeaderRow);
var dayDiv = $common.createElementFromTemplate({
nodeName : "div",
cssClasses : [ "ajax__calendar_dayname" ]
}, dayCell);
}

for (var i = 0; i < 6; i++) {
var daysRow = $common.createElementFromTemplate({ nodeName : "tr" }, this._daysBody);
for(var j = 0; j < 7; j++) {
var dayCell = $common.createElementFromTemplate({ nodeName : "td" }, daysRow);
var dayDiv = $common.createElementFromTemplate({
nodeName : "div",
properties : {
mode : "day",
innerHTML : " "
},
events : this._cell$delegates,
cssClasses : [ "ajax__calendar_day" ]
}, dayCell);
}
}
}

I hope this help.

Best regards,

Jonathan.

restricting the drop area of a control

how would one restrict the drop area of a control usingDragOverlayExtender?Hi,

the drop area in this case is the BODY area, thus there's no practical way to control it without changing the whole layout of the page.

Retrieve value from a dynamically created control inside an UpadetPanel

I would like to dynamically create some controls - tablecells, textboxes, and dropdownlists inside an AJAX UpdatePanel.
How would I retrieve the values that user enters into these controls in my vb.net code behind?
Can you please provide vb.net sample code ??

Here is my code:

'creates the textboxes - works fine

For i = 1 To intUnseatedGuestCount
Dim txtFirstName As New TextBox
txtFirstName.ID = "txtFirstName" + i.ToString
Me.tdNewSeatingCards.Controls.Add(txtFirstName)
Next

'code to retreive the values - produces an error message

Object reference not set to an instance of an object

For i = 1 To Me.hidNewSeatingCardCount.value
strTXTName = "txtFirstName" + i.ToString
Dim myTXT As TextBox = CType(Me.tdNewSeatingCards.FindControl("txtFirstName" + i.ToString), TextBox)
strTest += myTXT.Text + "<br>"
Next

Thank you for your help

You are creating controls dynamically, So on every postback (even in asynchronous postbacks ) you have to create it


OK Here is my code to recreate the controls:

For i = 1 To Me.hidNewSeatingCardCount.Value
Dim txtFirstName As TextBox = CType(Me.tdNewSeatingCards.FindControl("txtFirstName" + i.ToString), TextBox)
txtFirstName.ID = "txtFirstName" + i.ToString
Me.tdNewSeatingCards.Controls.Add(txtFirstName)
strTest += CType(Me.tdNewSeatingCards.FindControl("txtFirstName" + i.ToString), TextBox).Text
Next

There are no error messages, but I am not getting the values that the user enters into the textbox.

Thank you


Hi,

Thank you for your post!

You should place your recreate code in the init event.

The cause of the issue is viewstate process is finished before you recreate your controls!

If you have further questions,let me know!

Best Regards,

retrieve value from a dynamically created control

I would like dynamically create some controls - tablecells, textboxes, and dropdownlists inside an AJAX UpdatePanel.

How would I retrieve the values that user enters into these controls in my vb.net code behind?

Can you please provide vb.net sample code ??

Thank you for your help

http://forums.devx.com/showthread.php?t=16770

http://mail.123aspx.com/ArticleFrame.aspx?res=31558


here is a nice tutorial with example / code on how to create Dynamic controls and how to retrieve values from these dynamic controls.. [Page_Init() event is used here...]

SingingEels : Dynamically Created Controls in ASP.NET

hope it helps./.

Retrieving an atlas control object from an html element

Ok I know you can get the HTML element an atlas control is tied to using the associatedElement property of a control object. I was wondering if there is a way in the framework of retrieving a control if you've got the HTML element?

Hi,

yes, you can use the control property. For example, if myElement is a reference to a DOM element that is associated to an Atlas control, you can write

myElement.control;
to get a reference to the Atlas control.

Brilliant, thanks for the help.

2012年3月24日土曜日

Returning selected value from ModalPopup in a custom web control

I'm a little lost on how to do this conceptually -- can someone perhaps shed a little light on how this might be done?

    Custom web control consists of UpdatePanel with other UI controls and a ModalPopupExtender. The purpose is to be a reusable search popup, and I've got the search UI functionality working like a champ.

    Page with an UpdatePanel containing some container (textbox, listbox, label, etc), a linkbutton, and my custom control from #1.

What I would like to do is have the linkbutton call some script (be it client- or server-side, not sure what's the most appropriate yet) that does the following steps:

    Show the custom popup

    Allow the user to perform the search and select one of the results, which would close the popup

    Snag the selected value from my popup, then work with that value to update the container (i.e. if it's a listbox, then do some script to insert an appropriate item)

How can I pull this one off, so the search popup is an isolated, reusable control? I've got different instances where I need the selected value to change a Label, update a TextBox, or even be inserted in a ListBox. I've got plenty of public properties on the custom control already that determines the parameters for the search itself; is there a perhaps way to override the Show() method so that it would return the value of the selection after it closes? But since Show() wouldn't really block, I'm lost on how to do it.

Thanks a lot,
Jon

Am I screwed on this one? The best I've been able to get are two separate custom controls with a LOT of duplicated code ...

Control contents: Listbox, linkbutton to show popup, all the popup code

Then repeat with a new control replacing the Listbox with a Label etc ...

I hate having this much duplicated code; anytime I need to change the popup code I'll have to duplicate it in each of my custom controls. There has to be a better way to do this?!?


I am not sure if i understand you question 100% from what ive read but if you want to get a value return from the mod popup is should not be to hard.

Lets say i have a mod popup that has a textbox, a search button, a listbox of results and a submit button. What you could do is once you have run the search which you said is working great, display the results in the listbox in the popup. then when the user clicks the submit button an event is fired that checks to see if they selected one of the items in the list box, if not then it will tell them to do so. Then if you want to use that selected value to populate a listbox on the main for (say for example you searched in the popup for a street name and then selected the right street name from the listbox and clicked submit and you want the main form listbox to display all people on that street) then all you need to do is have the event for the submit button Click call a function you write that runs the query to get all people on that street and print their info the the list box.

It should not be hard to get the results from the popup, but im not sure i understand what you are asking so this could be no help at all :P


Well! There's a little different between the concept of Modal Popup in Windows and Web forms. The latter is just hiding all the controls in the Popup and show when needed but you should able to access the properties of those controls within the scope of the page.

Now, assuming that you want to create a ASP.NET reusable custom server control that "know-how" to popup a modal to collect data from the end-user. The basic class design can be used so you just have to declare a public property so that it can return the selected value. Another alternative is you can use a Session key to store the value so that the class container can retrieve after using your class. This key can be set as a property of your class prior to the container is using it.

I hope it help since your question left a lot of detail out hence it's not very clear.


My apologies for not being clear enough -- I think I wrote the initial post after too much coffee and a bit too much frustration. :(

The overall project is an admin web UI for AD objects, so popup searches are going to be very common. Some pages will have multiple popup searches, so it is my desire to completely wrap all of that functionality into a single reusable custom server control. The results of the search could be used to update different types of UI elements on the parent page; my struggle is with conceptually figuring out where the pieces go to make this work in more than one situation.

My custom control now is an UpdatePanel with all the search UI and tidbits inside, and a ModalPopupExtender. There are many public properties on my control, mostly to define how the search itself is going to work. TargetControlID for the extender is also exposed as a public property, so that I can wire the popup to any UI element on the parent page that I want. The control also has a hidden element in it; this hidden element eventually contains the selection the user chose from the search results and is exposed via a public "SelectedResult" property.

Everything up to this point is working 100%. I'm stuck, however, on implementing the hooks for getting the value back to the parent page. Once someone clicks the TargetControl and performs the search and selects a result (which then hides the popup through server script in the control itself), the result is stored in the hidden element and the user is back at the parent page. But how do I work with that SelectedResult then? I should be able to, once the popup is hidden, take that value and stick it somewhere on the parent page -- but apparently I'm missing something obvious, because I'm completely lost.

Do I handle it via a custom click event for the wired target (instead of just using TargetControlID)? Does OnOKScript fit in here somewhere? Since the activity to take place after a selection is made will be different depending on the situation, it needs to happen outside of my custom control. Are there additional extender props that I need to expose through a public property on my custom control?

I hope this helps -- I'm not seeking exact code samples, I'm more looking for help on getting my brain wrapped around the "how" of the solution ... the exact code I should be able to figure out after that, I think. If some of my code for certain parts would help, I'll be happy to post them -- just let me know. Thanks again!


Alright so im still not sure if this is anything helpful, but i have a small example here i wrote of what i would do to put the result from my modal popup into my main page and from there i could do what ever i want with it. I tried to comment the best i could to make it super easy to read

using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using AjaxControlToolkit;public partialclass administration_OIS_Default : System.Web.UI.Page{ ModalPopupExtender modPop =new ModalPopupExtender();//The main modal popupprotected void Page_Load(object sender, EventArgs e) { HiddenField results =new HiddenField();//Results from mod popup HiddenField hidden =new HiddenField();//Mod popup targetID UpdatePanel update =new UpdatePanel();//UpdatePanel to hold controls TextBox tempText =new TextBox();//Textbox for mod popup Button btnVisible =new Button();//Button to show mod popup Button btnSubmit =new Button();//Submit button in mod popup Panel container =new Panel();//Panel to hold controls for mod popup //Assign IDs to variables that need to be refrenced later container.ID ="Container1"; results.ID ="Result1"; hidden.ID ="Hidden1"; btnVisible.Text ="Click to show modPop"; btnVisible.ID ="visibleButton"; btnVisible.Click +=new EventHandler(this.btnVisible_Click);//Tell the button what do do when click update.ContentTemplateContainer.Controls.Add(btnVisible);//Add the button to main update panel update.UpdateMode = UpdatePanelUpdateMode.Conditional;//We only want the panel to update sometimes update.ChildrenAsTriggers =true;//IE. when child controls trigger it update.ContentTemplateContainer.Controls.Add(hidden);//Add "hidden" to the update panel tempText.ID ="textBoxTest";//Add a simple textbox to the control container.Controls.Add(tempText);//container to be placed in our modal popup btnSubmit.Text ="btnSubmit"; btnSubmit.ID ="btnSubmit1"; btnSubmit.Click +=new EventHandler(this.btnSubmit_Click);//tell submit what to do when clicked container.Controls.Add(btnSubmit);//and add it to our control container modPop.TargetControlID = hidden.ID;//We would rather use modpopup.Show() so we make this a hidden field modPop.PopupControlID = container.ID;//Define the object to be shown inside of mod popup modPop.DropShadow =true;//Why not a little style :P modPop.X = 500; modPop.Y = 250; update.ContentTemplateContainer.Controls.Add(modPop);//Add the modal popup to our update panel update.ContentTemplateContainer.Controls.Add(results);//Add our results holder to the update panel update.ContentTemplateContainer.Controls.Add(container);//Also add the modal popup contents form1.Controls.Add(update);//Add our updatepanel to the main form }/// <summary> /// Function will force the modalPopup extender function .Show to fire /// </summary>private void btnVisible_Click(object sender, EventArgs e) { modPop.Show(); }/// <summary> /// Function takes the users input from the modal popup and saves it to a hidden field /// located in the updatepanel so that it will be save for further use /// </summary>private void btnSubmit_Click(object sender, EventArgs e) { ((HiddenField)form1.FindControl("Result1")).Value = ((TextBox)((Button)sender).Parent.Controls[0]).Text; }/// <summary> /// Function will display the saved value from the modal popup to prove that it works /// </summary>private void showText() { txtOutput.Text = ((HiddenField)form1.FindControl("Result1")).Value; }/// <summary> /// Occurs when button1 is clicked, showing the save results from modal popup /// </summary>protected void Button1_Click(object sender, EventArgs e) { showText(); }}
 So basically the user will click a button here to show the modal popup. enter text and click submit in the modal popup, and then they are brought back to the main form where if they click on Button1,
the value that they entered into the modal popup will be displayed. I got lazy at the end and didnt add txtOutput or Button1 programmatically so if you want to run this code on your own i think those are
the only 2 things you will have to manuall add to the form
Enjoy

You know what, I think I've got it ... maybe I just needed to "air it out" and let my mind wander for a bit. Seems like it would be simple after all, let me know if I'm off base:

I could just have the custom control expose another public property, and the parent page sets that property to a hidden control on the PARENT PAGE. Then the custom server control sets that hidden control's value before calling hide(). The hidden control on the parent page would have an onChanged() event that could do whatever UI update activity is necessary. That would keep all of the code separate from the custom control, allowing it to work in any situation I needed.

I'm going to try that right now ... if it is indeed this simple, my apologies for going around in circles on this one Embarrassed


Sounds like your on the right track now, well at least the track that I felt is what would help you get to where you want to go. and yeah, sometimes its best to take your mind of things then come back with a different perspective, or go onto forums like this and let someone else share their point of view, it saves a lot of frusterationSmile


It actually turns out to be even simpler -- I just need my custom control to raise a public event when the user selects a search result, and passes the selection as part of the args. The consuming page just watches for that event and does whatever UI magic is necessary as a result. No hidden fields or other stuff in the middle.

Amazing how much clearer things get after talking it out. Thank you everyone for your help and patience -- I'll try to make this control available publicly shortly and post a link in this thread; your help has been invaluable!


invaluable, wow i feel specialBig Smile


Can you please give some example on how the modal popuo raises a public event and how the parent page watches for the event? Thanks.

jmbutler:

It actually turns out to be even simpler -- I just need my custom control to raise a public event when the user selects a search result, and passes the selection as part of the args. The consuming page just watches for that event and does whatever UI magic is necessary as a result. No hidden fields or other stuff in the middle.

Amazing how much clearer things get after talking it out. Thank you everyone for your help and patience -- I'll try to make this control available publicly shortly and post a link in this thread; your help has been invaluable!


Sure thing!

My ModalPopup is completely contained in a custom web control, so in that control's code I've first defined the custom event that I will raise, including a custom derived EventArgs class that will include the information about which search result the user selected:

public delegate void ResultSelectedEventHandler(object sender, SelectedEventArgs e);public event ResultSelectedEventHandler ResultSelected;public class SelectedEventArgs : EventArgs {public string Selection;public SelectedEventArgs(string selection) {this.Selection = selection; } }protected virtual void OnResultSelected(SelectedEventArgs e) {if (ResultSelected !=null) ResultSelected(this, e); }

Then in the click code for my selection button, I raise this event before hiding the popup ("RadioSelect" is a radio button from my search panel's GridView; it's value is a two-dimensional string array separated by '|'):

protected void lnkAddSelected_Click(object sender, EventArgs e) {// raise an event to notify the consuming page that a selection was made OnResultSelected(new SelectedEventArgs(Request.Form["RadioSelect"]));// we're done; close the popup ModalPopupExtender1.Hide(); }

Now, back on the consuming parent page, I subscribe to this event in the markup of my custom control (note I've exposed TargetControlID publicly as well so I can wire my custom control to anything I want):

<uc2:PopupADSearch ID="PrimaryOwner" runat="server" TargetControlID="lnkChangePrimaryOwner" OnResultSelected="PrimaryOwner_Selected" />

Finally, in the code for my parent page, I define the PrimaryOwner_Selected method:

protected void PrimaryOwner_Selected(object sender, PopupADSearch.SelectedEventArgs e) {string[] selection = e.Selection.Split('|'); hidPrimaryOwner.Value = selection[0]; lblPrimaryOwner.Text = selection[1]; }

It's also important to note that the custom control, hidPrimaryOwner (a hidden control), and lblPrimaryOwner (a typical label server control) are all within an UpdatePanel -- otherwise all this jazz wouldn't work without a full-page postback. Hope you find this useful!


Hi,

From this post, I felt that you guys h've worked in Modal popup extender. I am posting my question expecting help if anyone knows.

I display Modal Popup( which shows the grid rows and button controls in panel) on clicking imagebutton. I want to align the the button in panel to center ans currently its left aligned and looks awkward. Can anyone tell me how do we align the button control in Model Popup's panel..

Here is the existing code.

Code forbtnSubmit is underlined in Italic in below code for easy identification.

///<summary>

/// Event Handler for Grid selection

///</summary>

///<param name="sender"></param>

///<param name="e"></param>

protectedvoid apprvlsGrid_SelectedIndexChanged(object sender,EventArgs e)

{

if (apprvlsGrid.SelectedIndex >= 0)

{

vwbenftsImgBtn.Visible =true;

string gridAprveSwID;

// Validations on Approve and reject buttons using javascript

if(apprvlsGrid.SelectedIndex <= 7)

gridAprveSwID ="ctl00_ContentPlaceHolder1_apprvlsGrid_ctl0"

+ (apprvlsGrid.SelectedIndex + 2) +"_approveSwHdn";

else

gridAprveSwID ="ctl00_ContentPlaceHolder1_apprvlsGrid_ctl"

+ (apprvlsGrid.SelectedIndex + 2) +"_approveSwHdn";

apprvBtn.Attributes.Add("OnClick","return fnaprvValidate('" + gridAprveSwID +"')");

rejectBtn.Attributes.Add("OnClick","return fnrejValidate('" + gridAprveSwID +"')");

// Controls declared dynamically for Modal Popup using Ajax

Button vwbenftsBtn =newButton();

Button btnSubmit =newButton();

Panel container =newPanel();

container.Width = 400;

container.Height = 350;

container.BorderWidth = 1;

container.BackColor =Color.WhiteSmoke;

GridView benfGrd =newGridView();

//Assign IDs to variables that need to be refrenced later

container.ID ="Container1";

benfGrd.ID ="benfGrd";

benfGrd.AutoGenerateColumns =false;

benfGrd.Width = 400;

benfGrd.Height = 300;

Literal newline =newLiteral();

Literal spaces =newLiteral();

Approvals apprvls;

Approval aprvalVwBenfts =newApproval();

if (Session["aprvlsList"] !=null)

{

apprvls = (Approvals)Session["aprvlsList"];

int iApprvlsCount = apprvls.Count;

GridViewRow aprvlsSelectRw = apprvlsGrid.SelectedRow;

aprvalVwBenfts.BinId =Convert.ToInt64(aprvlsSelectRw.Cells[13].Text);

aprvalVwBenfts.CardId =Convert.ToInt64(aprvlsSelectRw.Cells[14].Text);aprvalVwBenfts.SetId =Convert.ToInt64(aprvlsSelectRw.Cells[15].Text);

aprvalVwBenfts.TableCd = aprvlsSelectRw.Cells[17].Text;

aprvalVwBenfts.EffDate =Convert.ToDateTime(aprvlsSelectRw.Cells[7].Text);

aprvalVwBenfts.SetDesc = aprvlsSelectRw.Cells[6].Text;

if (aprvalVwBenfts.TableCd =="B")

aprvalVwBenfts.TableID = aprvalVwBenfts.BinId;

else

aprvalVwBenfts.TableID = aprvalVwBenfts.CardId;

for (int iRow = 0; iRow < iApprvlsCount; iRow++)

{

if (aprvalVwBenfts.TableID == ((Approval)apprvls[iRow]).TableID

&& aprvalVwBenfts.SetId == ((Approval)apprvls[iRow]).SetId

&& aprvalVwBenfts.TableCd == ((Approval)apprvls[iRow]).TableCd&& aprvalVwBenfts.EffDate == ((Approval)apprvls[iRow]).EffDate)

{

int isetBenftCOunt;

isetBenftCOunt = ((Approval)apprvls[iRow]).getSetBenefitCount();

SetBenefit[] setSetBefts = (SetBenefit[])((Approval)apprvls[iRow]).getSetBenefits();

//Loads the Modal Pop up controls

// Dynamically create field columns to display the desired

// fields from the data source. Create a TemplateField object

// to display an author's first and last name.

TemplateField benfGridCol =newTemplateField();

// Create the dynamic templates and assign them to

// the appropriate template property.

benfGridCol.ItemTemplate =newGridViewTemplate(DataControlRowType.DataRow,"");

benfGridCol.HeaderTemplate =newGridViewTemplate(DataControlRowType.Header, aprvalVwBenfts.SetDesc);

// Add the field column to the Columns collection of the

// GridView control.

benfGrd.Columns.Add(benfGridCol);

benfGrd.DataSource = createGridData(setSetBefts, isetBenftCOunt);

benfGrd.DataBind();

vwbenftsImgBtn.ID ="vwbenftsImageBtn";

vwbenftsImgBtn.ToolTip ="View Benefits for Selected Set";

//vwbenftsImgBtn.Click += new ImageClickEventHandler(this.vwbenftsImgBtn_Click);

container.Controls.Add(benfGrd);

btnSubmit.CssClass ="btn";

btnSubmit.Text ="Close";

btnSubmit.ID ="btnSubmit1";

newline.ID ="newline";

newline.Text ="<br/> ";

//spaces.ID = "spaces";

//spaces.Text = "aaaaaaaaaaaaaaaaa";

//spaces.Visible = false;

//subBtnTble.Style = "center";

//subBtnTble.ID = "subBtnTble";

//subBtnTble.Controls.Add(btnSubmit);

container.Controls.Add(newline);

//container.Controls.Add(spaces);

container.Controls.Add(btnSubmit);

// Specify the Image button as Modal Popup target

modPop.TargetControlID = vwbenftsImgBtn.ID;

//Define the object to be shown inside of mod popup

modPop.PopupControlID = container.ID;

modPop.DropShadow =true;

modPop.X = 250;

modPop.Y = 100;

modPop.OkControlID = btnSubmit.ID;

// Add all the controls to Page's form

formApvl.Controls.Add(vwbenftsImgBtn);

formApvl.Controls.Add(modPop);

formApvl.Controls.Add(container);

}

}

}

}

}

Thanks

Shilpa


Actually, I don't think this has anything to do with this thread -- your question is more geared towards HTML / CSS. You can center any HTML entity using appropriate CSS. If you need more specific answers, I would recommend starting a new thread entirely in one of the other forums (while you are referring to an AJAX extender, your question really has nothing to do with AJAX.)

richtexteditor

I noticed is present in development folder version 10917 a control named 'richtexteditor'

is possible to use it? I tried to compile, but the control doesn't work...

There are quite a few rich text editors available for ASP.Net. Check out the following link:

http://geekswithblogs.net/jawad/archive/2005/05/25/CommunityEditor.aspx

Rounded Corner Control

I was trying to use the rounded corner extender with panels. I have applied border to the panels. Whenever i use the extender with the panels the effect is there however it is not clearly visible as the border does not have the rounded corners. When i remove the border then the effect is clearly visible. Please help me using the rounded corner extender with the panels so that the border will have rounded corners.

Thanks and Regards,

Geevika

Hi Geevika

To troubleshoot this issue, we really need the source code to reproduce the problem, so that we can investigate the issue in house. It is not necessary that you send out the complete source of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it.Before that , We also suggest that you should have a look at thishttp://www.asp.net/AJAX/Control-Toolkit/Live/RoundedCorners/RoundedCorners.aspx.

Here we provide a sample ,which is contained in Control Toolkit source code.

<ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" />
<div class="demoarea">
<div class="demoheading">RoundedCorners Demonstration</div>

<asp:Panel ID="Panel1" runat="server" Width="330px" CssClass="roundedPanel">
<div style="padding: 10px; text-align: center">
<div style="padding: 5px; border: solid black thin; background-color: #B4B4B4;">
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/AJAX.gif" AlternateText="ASP.NET AJAX" /><br />
ASP.NET AJAX
</div>
</div>
</asp:Panel>

<ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server"
BehaviorID="RoundedCornersBehavior1"
TargetControlID="Panel1"
Radius="6"
Corners="All" />

<div style="padding-top: 3px;">CornerRadius:</div>
<div style="padding: 10px;">
<input type="radio" id="radius0" name="radiusValues" value="0"
onclick="$find('RoundedCornersBehavior1').set_Radius(this.value);" />
<label for="radius0">None</label>

<input type="radio" id="radius2" name="radiusValues" value="2"
onclick="$find('RoundedCornersBehavior1').set_Radius(this.value);" />
<label for="radius2">2px</label>

<input type="radio" id="radius4" name="radiusValues" value="4"
onclick="$find('RoundedCornersBehavior1').set_Radius(this.value);" />
<label for="radius4">4px</label>

<input type="radio" id="radius6" name="radiusValues" value="6"
onclick="$find('RoundedCornersBehavior1').set_Radius(this.value);" checked="checked" />
<label for="radius6">6px</label>

<input type="radio" id="radius10" name="radiusValues" value="10"
onclick="$find('RoundedCornersBehavior1').set_Radius(this.value);" />
<label for="radius10">10px</label>
</div>

<div style="padding-top: 3px;">Corners:</div>
<div style="padding: 10px;">
<input type="checkbox" id="corner1" name="cornerValues" value="1"
onclick="$find('RoundedCornersBehavior1').setCorner(this.value, this.checked);" checked="checked" />
<label for="corner1">Top Left</label>

<input type="checkbox" id="corner2" name="cornerValues" value="2"
onclick="$find('RoundedCornersBehavior1').setCorner(this.value, this.checked);" checked="checked" />
<label for="corner2">Top Right</label><br />

<input type="checkbox" id="corner8" name="cornerValues" value="8"
onclick="$find('RoundedCornersBehavior1').setCorner(this.value, this.checked);" checked="checked" />
<label for="corner8" >Bottom Left</label>

<input type="checkbox" id="corner4" name="cornerValues" value="4"
onclick="$find('RoundedCornersBehavior1').setCorner(this.value, this.checked);" checked="checked" />
<label for="corner4">Bottom Right</label>
</div>

<div style="padding-top: 3px;">Border Color:</div>
<div style="padding: 10px;">
<input type="radio" id="color0" name="colorValues" value=""
onclick="$find('RoundedCornersBehavior1').set_BorderColor(this.value);" checked="checked" />
<label for="color0">None</label>

<input type="radio" id="color1" name="colorValues" value="Black"
onclick="$find('RoundedCornersBehavior1').set_BorderColor(this.value);" />
<label for="color1">Black</label>

<input type="radio" id="color2" name="colorValues" value="Red"
onclick="$find('RoundedCornersBehavior1').set_BorderColor(this.value);" />
<label for="color2">Red</label>

<input type="radio" id="color3" name="colorValues" value="Aqua"
onclick="$find('RoundedCornersBehavior1').set_BorderColor(this.value);" />
<label for="color3">Aqua</label>
</div>
</div>

If your problem has been resolved or be resolved by the sample , please mark it as "Answered" or "Resolved", so our community members will not waste their time on a resolved issue. Otherwise, would you please provide a sample here? Thanks.

Best Regards,

Jonathan


Hi Jonathan,

Thanks for ur reply. The following is the part of the source code:

<asp:Panel ID="pnlCountry" runat="server" Style="position: relative; top: 24px; border-style: groove;
left: 8px; z-index: 101;" Height="125px" Width="950px" BackColor="#E0E0E0">

<asp:Label ID="lblCountryName" runat="server" Style="z-index: 100; left: 296px; position: absolute;
top: 32px" Text="Country Name" Width="104px"></asp:Label>
<asp:TextBox ID="txtCountryName" runat="server" Style="z-index: 101; left: 424px;
position: absolute; top: 32px"></asp:TextBox>
<asp:Button ID="btnCancelCountry" runat="server" Style="z-index: 106; left: 808px;
position: absolute; top: 80px" Text="Cancel" BackColor="Silver" />
<asp:Button ID="btnSaveCountry" runat="server" Style="z-index: 104; left: 712px;
position: absolute; top: 80px" Text="Save" Width="56px" BackColor="Silver" />
</asp:Panel>

<ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender2" runat="server" TargetControlID="pnlCountry"
Radius="8" Corners="All" />

As u might have noticed I have applied border style= groove to the panel name pnlCountry. After that I have used the RoundedCornersExtender to round the corner of the panel. However, the effect is that the panel has the rounded corner but because of the border it seems that corners are still pointed as it is the panel that gets the rounded corners not the border of the panel. So the effect is there but it is not visible. Plz help.

Thanks & Regards,

Geevika


Hi Geevika,

Would you please explain more clearly? I have tested your sample and it seems that the border , which is groove ,is not displayed well. If it is your problem, I think it's CSS issue. My suggestion is using a <div> element show the border instead of your Panel control.

Best Regards,

Jonathan


Country Name

Hi Jonathan,

I think I was unable to explain my point clearly. The code that i sent to you gives the above result however, this above displayed output did not include Ajax rounded corner control. As you can see the border is clearly visible and border style is groove. Now whenever I apply the ajax rounded corner control, the border remain as it is(pointed corners) but the panel body(inner light gray part) gets the rounded corners. So the effect of rounded corner control is there but that is not clearly visible as the border did not get the rounded corners. What I m trying to do is that the panel border should also get the rounded corners so that the effect should be clearly visible.

Thanks & Regards,

Geevika


Hi Geevika,

As far as I know, I'm afraid that we cannot achieve this by setting any property directly.I have nested a RoundedCornersExtender but find that it is difficult to control its diplay position.So I think the best way is using <div> element.

Best Regards,

Jonathan