How to Open a Secure & Vulnerable URL on MOSS Site by Using RAD Menu & RAD Window, loaded as a Web Part [.dll]
Cancel
The title field is required!
Thread is closed for posting
1
posts,
0
answers
-
5A5BE14C-4F54-49C9-BFC1-92BD8FC6069A
1
posts
Member since:
Sep 2007
Posted 11 Sep 2007
Link to this post
RadControls version |
4+ |
.NET version |
2.0 |
Visual Studio version |
2003/2005 |
programming language |
C# & Javascript |
browser support |
all browsers supported by RadControls |
PROJECT DESCRIPTION
How to open a "Secured" or "Vulnerable" URL on the internet without exposing its Address to the client?or, Is There any way in/other than Explorer Window to view external URLs & also, can we remove status bar, address-bar etc. from the window?
We can use RADWINDOW for the same. Following is the code for creating a web-part for reaching any external website. |
|
[1] Add OnClientItemClicking to RadMenu and call the Javascript function “clickHandler”. This will call the javascript code & check for condition. |
Which will then open the RADWINDOW with the desired ID using RADOPEN. |
|
[2] We can disable the status-bar by turning “VisibleStatusbar” of RADWINDOW to false.
|
namespace Web_Part1 |
{ |
[Guid("196a04b2-d6b5-43f6-b600-a3a263f288f9")] |
public class Web_Part1 : System.Web.UI.WebControls.WebParts.WebPart |
{ |
Button btn1 = new Button(); |
RadWindowManager rwm = new RadWindowManager(); |
protected override void CreateChildControls() |
{ |
rwm.ID = "rwm"; |
|
RadWindow rw_Open_OWA= new RadWindow(); |
rw_Open_OWA.ID = "rw_Open_OWA"; |
rw_Open_OWA.NavigateUrl = "http://webmail.ad.domain.com/owa/"; |
rw_Open_OWA.VisibleStatusbar = false; |
rw_Open_OWA.Height = Unit.Pixel(450); |
rw_Open_OWA.Width = Unit.Pixel(700); |
rwm.Controls.Add(rw_Open_OWA); |
this.Controls.Add(rwm); |
|
Label Label1 = new Label(); |
Label1.Text = "<script type='text/javascript'> function Click(sender, eventArgs){if (eventArgs.Item.Text == \"Open_OWA\"){radopen(null,\"rw_Open_OWA\");return false;}}</script>"; |
this.Controls.Add(Label1); |
|
RadMenu rm = new RadMenu(); |
rm.ID = "rm"; |
rm.OnClientItemClicking = "Click"; |
|
// Add sub-items |
RadMenuItem rmSubItem = new RadMenuItem(); |
rmSubItem.Text = "Open_OWA"; |
rm.Items.Add(rmSubItem); |
|
this.Controls.Add(rm); |
} |
|
protected override void RenderContents(System.Web.UI.HtmlTextWriter output) |
{ |
RenderChildren(output); |
EnsureChildControls(); |
} |
} |
} |
OTHER BENEFITS OF THE ABOVE TRICK: |
[1] It doesn't refresh the page already open [ asynchronous for page with .dll ]. |
[2] Radwindow Is Highly customizable. |
[3] It closes along with the actual browser window which opened it. |
[4] Secure & Faster Than Other Browser windows. [ Due to caching. ] |
[5] Does not open a new window with Ctrl+N [ Remember other browser windows are vulnerable to Ctrl+N ] ! [6] There can be a problem of caching, as it is un desirable at times. This can also be overcome by working on "OnClientShow" event handler. |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-