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

2012年3月28日水曜日

Reset (buttom) Functionality

Can somebody tell me of a robust way to reset controls (server side) on a form using ajax? Not sure if this is clear or not but the issue that I'm having is that I have an update panel that contains about 6-8 controls (drop down lists and text boxes). The text boxes contain ajax watermark extenders. I tried using the standard html reset button however, my watermarks are not coming back as the defautl text for each text box. Instead, the text boxes are just blank.

In addition, when just resetting a text box control in an update panel, if there is a dropdownlist (postback set to no) the drop down list flickers everytime and it is somewhat annoying.

Any advice and information on these two issues would be greatly appreciated.

Thanks

Hasn't anybody solved this?!

I've got a Reset link that calls a client-side javascript function, but I can't reset a watermarked textbox. (I've tried resetting its class attribute and its value, but it then loses its watermark behaviour.)

Any help would be greatSmile


I also am having this problem. It is amazing that nobody has replied!??Smile

Cheers

2012年3月26日月曜日

Response.redirect causing error when used with ajax

Hi Guys,

I hope somebody can help me with my problem, I'm fairly new to ajax.I have a datalist in my app which has a clickable button which directs the user to a subroutine....


1Sub PhotoCommand(ByVal objAs Object,ByVal EAs DataListCommandEventArgs)2Dim CommandAs String = E.CommandName3Dim ArgumentAs String = E.CommandArgument45If Session("UserID")Is Nothing Then6 Response.redirect("index.aspx")7End If8End Sub


This works fine when not in a updatepanel and the updatepanel worksfine without the redirect in it, but when you use the two together andclick the button you get the following error in an alert box.

"Sys.Webforms.PageRequestManagerParserErrorException:The message received from the server could not be parsed. Common causesfor this error are when the response is modified by calls toresponse.write(), response filters, HttpModules or server trace isenabled

Details:Error parsing near'

<!DOCTYPE ht'"

Anyone got any idea why this might be ?

Jon

Hi,

Sorry guys, just found out what the problem was by searching the forum a bit more. FOr the sake of anyone else with the same problem, I had forgotten to add the following to my web.config...

<httpModules>

<addname="ScriptModule"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</httpModules>

2012年3月21日水曜日

Rounded Corners cannot accept Width = "__%"

Hopefully, somebody may be able to tell me if I'm doing something wrong here.

All I'm trying to do ismake a panel sit inside of another panel.
Theinner panel must have rounded corners and both panelsmust resize with the browser window.


Without Atlas RoundedCorners I can say:

<asp:PanelID="OuterPanel"runat="server"BorderColor="Black"BorderStyle="Solid"BorderWidth="1px"BackColor="blue"
Style="left: 5%; top: 5%; position: relative"Height="90%"Width="90%">

<asp:PanelID="InnerPanel"runat="server"BorderColor="Black"BorderStyle="Solid"BorderWidth="1px"BackColor="red"
Style="position: absolute; margin-left:10%; margin-top:12%"Height="73%"Width="90%">
</asp:Panel>

</asp:Panel>

and everything behaves and looks fine (minus the rounded corners) - this includes both panels resizing with the window

However... once I add the RoundedCornersExtender and point it at the Inner Panel

<cc1:scriptmanagerid="ScriptManager1"runat="server"/>
<cc2:roundedcornersextenderid="RoundedCornersExtender1"runat="server">
<cc2:RoundedCornersPropertiesRadius="10"TargetControlID="InnerPanel"/>
</cc2:roundedcornersextender>


...The graphics get all confused.
Yes, I've got the rounded corners, but 2 things are wrong.

1. The inner panel stops resizing in Width (resizes ok in height)
2. It looks like a transparent box of almost the same height as the panel is missing from the right of the Inner panel.

The really wierd thing is:
If (on the Inner Panel) I replaceWidth="90%"for Width="700px" Then the above 2 problems are fixed.

But, that leaves me with a panel that doesn't resize with the rest of the controls on my page - totally defeating the point !!

I don't understand why this Atlas control works fine with Height="90%", but not Width="90%"

Can anyone help ?
I've been struggling for ages with this !

Thanks,
Scott

So, no-one has any thoughts on this ?

Aren't there any Atlas type officials out there at least willing to recognise this bug ??


From what I can tell this is a bug... you cannot set the height or width to xxx% when using the Rounded Corners extender. It has never worked for me. So I just make sure that the data I put into the panel is of a predefined height,

Dunno if it will ever get fixed.

Cheers
Graeme


Check out our free rounded panel control for ASP.NET 2, also our free security code image control.http://www.roundedpanel.baysoft-net.co.uk. Hope this helps. It's pretty flexible.


You've got one panel with position: relative and another with position: absolute and you expect them to behave the same? Not going to happen. remove the position: absolute from the second panel.

Also, it looks like you might have an older version of the AJAX Toolkit because of the RoundedCornersProperties entity. Those properties should be in the RoundedCournersExtender tag. I'd recommend downloading the latest version of the toolkit.