Showing posts with label sub. Show all posts
Showing posts with label sub. Show all posts

Wednesday, March 28, 2012

Why Properties Sub Controls?

I don't understand why ACT always uses a special sub control within its controls.

Usually in ASP.NET controls are designed to have attributes on their own. Why this design?

TIA,

Axel Dahmen

Hi Axel,

The Toolkit sits directly on top of the ASP.NET AJAX Framework, which chose to use this approach. I think it's because this is how control extenders work in WinForms and they were going for a familiar approach - but this has actually been changed in the beta so that the properties, etc., have been moved up to the extenders.

Thanks,
Ted

Monday, March 26, 2012

window.open (javascript function) + atlas

Hi everyone,

I'd like to know how create a simple function under Atlas (I used one before Atlas and it's works very well), like that one:

Sub wOpen(ByVal fWindow As String, ByVal fNameWin As String, ByVal fWidth As Integer, ByVal fHeight As Integer, ByVal fMenu As Boolean, ByVal fResizable As Boolean, ByVal fScroll As Boolean)
Dim strJ As String = "<script language='javascript'>"
strJ &= "window.open('" & fWindow & "', '" & fNameWin & "', "
strJ &= "'width=" & fWidth & ", height=" & fHeight & ", menubar="
If fMenu = True Then
strJ &= "yes"
Else
strJ &= "no"
End If
strJ &= ", resizable="
If fResizable = True Then
strJ &= "yes"
Else
strJ &= "no"
End If
strJ &= ", scrollbars="
If fScroll = True Then
strJ &= "yes"
Else
strJ &= "no"
End If
strJ &= "')<"
strJ &= "/script>"
Page.RegisterClientScriptBlock("wOpen", strJ)
End Sub


But under Atlas when a call it doesn't work:
wOpen(wOpen("http:..", "myWindow", 810, 620, True, True, True)

I really seach about, but I can't find anything about it.

So, if someone can help I really be thanks.

José SP/Brazil

It's me back again, and I've the answer, I just need remove the javascript tag from the code, like that:

Sub wOpen(ByVal fWindowAsString,ByVal fNameWinAsString,ByVal fWidthAsInteger,ByVal fHeightAsInteger,ByVal fMenuAsBoolean,ByVal fResizableAsBoolean,ByVal fScrollAsBoolean)Dim strJAsString

strJ =

"window.open('" & fWindow &"', '" & fNameWin &"', "

strJ &=

"'width=" & fWidth &", height=" & fHeight &", menubar="If fMenu =TrueThen

strJ &=

"yes"Else

strJ &=

"no"EndIf

strJ &=

", resizable="If fResizable =TrueThen

strJ &=

"yes"Else

strJ &=

"no"EndIf

strJ &=

", scrollbars="If fScroll =TrueThen

strJ &=

"yes"Else

strJ &=

"no"EndIf

strJ &=

"')"Me.ClientScript.RegisterStartupScript(Me.GetType(),"wOpen", strJ,True)EndSub