C# - Calling Modal Window From Secure Website Links?

Jan 28, 2011

I currently have a asp test site setup which when the user clicks on the login link it opens the standard asp.net login page (login.aspx) within a modal telerik RadWindow. I am calling this page using javascript and this works fine.

The challenge I have now is when a user clicks on a link within the page if that link points to a secure section the login screen loads in the main frame of the site vs. a pop-up. I realize why (aka my js funciton is not being called) my question is to work around this would the correct/acceptible approach be to call a method from each link/button that tests for user authenticaiton? If the user is authenticated then redirect to the page otherwise call the javascript funciton to open the window?

[code]....

View 1 Replies


Similar Messages:

AJAX :: Modal Popup Window - Links / Tutorials?

Aug 11, 2010

I wish to do a modal popup window. I am new to AjaxControlToolkit. provide tutorial links explaining the necessary things to do this in a step by step manner.

View 2 Replies

Calling Secure Web Service From Anonymous Website?

Feb 1, 2011

I have a web service that is set as secure via the web config:

<authentication mode="Windows" />
<authorization>
<allow roles="METWeb-Admin"/>
<deny users="*"/>
<allow users="METJoeUser;METJoeSmith"/>
</authorization>

And also in IIS 7 (Windows Server 2008) it has the following set for Authentication:

Anonymous Authentication:Disabled
ASP.NET Impersonation: Disabled
Basic Authentication Disabled
Forms Authentication: Disabled
Windows Authentication: Enabled

The anonymous site I am calling it from in IIS7 is:

Anonymous Authentication:Enabled
ASP.NET Impersonation: Disabled
Basic Authentication Disabled
Forms Authentication: Enabled
Windows Authentication: Disabled

In the Anonymous web site, I call the secure web service via:

moms.momService myMom = new moms.momService();
NetworkCredential netCred = new NetworkCredential(@"username", "password");
strStatus = myMom.createBackupDirectoryAndPrivs(sData);

Everytime I run this, it returns as Unauthorized. I have made sure this user is in the Web-Admin AD Group. I also tried adding the user as an Allow User but still unauthorized. I am pretty sure the problem lies somewhere in IIS but not sure what else to check.

BTW: For what it's worth, if I run the Anonymous site via VS2010 development on my dev box, and call the secure site using above code, it works fine. This is why I am thinking IIS on the PROD server.

View 1 Replies

C# - Login Time Out When Calling Opening A New Window From Modal Popup?

Jun 15, 2010

I have a weird problem. I have a window, on a button click I open a modal popup (using ModelPopupExtender), that let's you select a few criteria and then click a submit button. On click of submit button, I open a new window (using window.open()) that shows the status of what happened to your submitted request. However, every time this status window is opened, it goes to the login page. I am thinking the modal popup can't pass the authentication cookie to the newly opened window, but I'm not sure.

View 1 Replies

Forms Data Controls :: Datalist Links Opening In New Window Rather Than Parent Window?

Jan 28, 2010

i have following datalist in WhatsNews.aspx page.

[Code]....

when i open home page and click a link in whatsnew section, IE 8 opening the links in a new window.but firefox 3.5.7 opens in parant window, just like i want.how can i make IE 8 also open the links in parent window?

View 3 Replies

Security :: Broken Links On After Secure Login?

Feb 25, 2010

I have a masterpage that contains a number of links. When I login to the secure area of my website, the links are broken they are trying to access the page as if it was stored in the SecurePages folder. Code below:

[Code]....

View 8 Replies

C# - How To Secure Web Service To Only Allow Relative Path Calling

May 19, 2010

I have ASMX services for my web application that I would only like available to the same application.Is there a way for the web service to only be accessible by the same application, such as relative/absolute path restrictions?

View 3 Replies

State Management :: Get The Calling Url Referrer From A Secure Site?

Jul 14, 2010

I need to get the calling page url referrer and host name. I works for me if the calling pages are within the same network. When a page is called from an internal site that are outside of my network, I got the following error:

Object reference not set to an instance of an object.

It failed on this line:

string userURL = Request.UrlReferrer.ToString();

View 1 Replies

Make 5 Links To Open The Same Modal Popup?

Mar 22, 2010

I have 5 links that are on the same form but I would like them all to reference the same AJAX modal popup extender. I am basically showing a panel with the same view layout with just different data depending on which link is pressed, showing different match scores from games.

The only way I can get it to work is have 5 panels with unique names where each link references its own panel. Can I make all the links call the same panel?

View 1 Replies

Javascript - .NET Cross Domain Modal Window (window.showModalDialog) - Parameter Value Always "undefined"?

Aug 27, 2010

I have two webpages, parent page .aspx and child page .html.
On parent page I have JavaScript function for invoking child page as modal window via window.showModalDialog.

function viewCourseModal(url) {

var sPars = SomeParameters();
var returnedValue = window.showModalDialog(url, "", sPars);[CODE]...

So when I launch parent window and invoke child modal window, parameter with "someValue" gets returned to the parent window (to modalReadyForTest control) upon clicking the button Button1.It works fine when I have both parent and child pages on the same domain. When I have them on different domains, value of the parameters does not get passed and instead it is always "undefined".Is there any way to have modal window from different domain returning parameter value to parent page? Can those cross domain issues be solved at all or should I try completely different approach?

View 1 Replies

Forms Data Controls :: Show Links In Gridview / Open In New Window?

Jun 16, 2010

I have a list of links displayed in a gridview that, when clicked, open in a new window. I used OnClientClick = "form1.target = '_blank';" to achieve this. I also need to let the users delete links. Problem is, when I click the delete button it calls the OnClientClick event even though it isn't in the delete tag. This only happens if I click delete after I have clicked on a link. The result is that the link I am trying to delete opens up in a new window and is not deleted.

View 4 Replies

AJAX :: Modal Calling VB Code Behind Function?

Feb 16, 2010

I have just discovered the modal function and so am fairly new to it.I have a signup procedure that requires a member to be approved by the website administrator.During this Approval I wanted to display a Modal after the Approve button is pressed, which I have managed to do , but I have a textbox on my Modal so that the administrator can enter special notes about the members application. Once the OK button on the Modal has been clicked I want the Modal to save the content of the textbox back to database along with a couple of other things like changing the application status to approved and entering an approval date. I can do this in the codebehind no problem but how do I get the Modal to call the codebehind function and capture the content of the text box from the modal.I thought I could do this by setting the "OnOkScript" parameter on the Modal Popup Extender to the name of my code behind function but this just errors, presumably because it is looking for a jscript function? So my next step is to call the codebehind function from a jscript on the page.

View 1 Replies

Modal Window Is Not Maximizing

Mar 12, 2014

I happen to need this modal window to appear in height and width to be as large as a standard webform... I placed settings in the showdialog function for specific height and widths and nothing happened it maintained the size of a small dialog window with scroll bars vertical ones.

so far this is my javascript code behind the c#

Code:
<script type="text/javascript">
var childwindow ;
function ShowDialog() {
childwindow = window.showModalDialog("CriticalIncidentReport.aspx", 'center: yes;resizable: yes ;status:0;state:maximize');
}
</script>

This is the c# code behind the button click event

Code:
protected void myBtn_Click(Object sender,
EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "JScript", "ShowDialog();", true);
}

View 3 Replies

Web Forms :: Actually Calling Window.Onresize And Control It?

Feb 8, 2011

Can I actually call window.onresize as well as control when it automatically executes?

View 3 Replies

Web Forms :: Calling An Aspx Page With New Window?

Mar 10, 2011

I have an web application in a server.there is an aspx page i need to call an aspx page with new window using response.write().

ex: Response.Write("www.abc.com/page1.aspx");

But it will open the page in the same window but i want to open the page in new window.

View 4 Replies

Web Forms :: Can Open A New Window When Calling A Function

Oct 7, 2010

How can I open a new window when calling a function. I do not want to open this new window on a click event. There are now buttons or hyperlinks involved. When a function is called I need a new window to open.

View 12 Replies

Want To Put Secure Payment Gateway For Website

Feb 24, 2011

i want to put secure payment gateway for website.

View 3 Replies

C# - Calling User Control Javascript Functions From New Window

Mar 31, 2011

I have a user control which opens a new window for some item selection. Once an item is selected on that window, the item ID should be passed to a callback javascript function in the user control. In order to have a unique callback function name in the user control (it may have multiple instances on the same page), I added the user control ID to the function name as follows (defined in the ascx file):

function OnItemSelection_<%=this.ID%>(selectedItemID)
{
OnItemSelection("<%=SomeControl.ClientID%>", selectedItemID)
}
Where OnItemSelection is defined in an external js file:
function OnItemSelection(controlID, selectedItemID)
{
$(controlID).do_something(selectedItemID);
}
The issue is that now I'm not sure how the new page can call the "right" function (of the user control instance where it was opened from). The only idea I have in mind so far is passing the name of the callback function in the query string:
var CallbackFunction = function(selectedItemID)
{
window.opener.<%=Request.QueryString["CallbackFunctionName"]%>(selectedItemID);
}
or maybe just the opening user control ID:
var CallbackFunction = function(selectedItemID)
{
window.opener.OnItemSelection_<%=Request.QueryString["UserControlID"]%>(selectedItemID);
}

My questions are:

1) Is it a bad practice passing javascript function names (or user control IDs) like that (I suspect it is)?

2) What could be better way to handle this scenario? Edit: Another way I'm considering now is declaring a global variable in the user control (registering it from the code behind so it'll appear only once). Then, when opening the new window, it's possible to assign the relevant function to it (OnItemSelection_<%=this.ID%>), and call it from the new window. Seems much cleaner than passing user control data through the query string.

View 1 Replies

Calling Browse File Window Of Fileupload Control?

Oct 5, 2010

I have an ImageButton and a FileUpload controls in a child page of a master page. I would like to achieve something like when user click on the ImageButton, the browse file window will pop-up like what we did when we click on the Browse button of the FileUpload control.

How can call the browse file window of the FileUpload control when i click on the ImageButton?

View 1 Replies

Web Forms :: Calling Response.TransmitFile From Window Dialog?

Feb 11, 2010

I create a window dialog by calling window.showModalDialog;

In that dialog I want to execute a Response.TransmitFile like the code below. The code works fine from a non dialog window. However it just hangs if I call it from the modal dialog page. No error messages. I just doesn't do anything. Is there something else I need to do to get this to function in a dialog window?

string thePath = "c:\temp\New Text Document.txt";
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + "New Text Document.txt");
Response.TransmitFile(thePath);
Response.End();

View 2 Replies

VS 2005 - How To Secure Website Using Default Certificate

Jun 7, 2010

I want to secure my certain web page of site, Displaying lock icon at status bar of browser. How do I achieve this in 2.0 using any default certificate?

View 6 Replies

Download Files From Secure Website Programmatically (c#)?

Dec 3, 2010

I've to download files from our 38 clients secure websites. They are our data resources. Currently data collection process is manual. Logon to the site, login with username and password, then download files, save to local folder, close window once download is completed. We are trying to automate download process. Plan is to handle login part with code and directly show list of filename to User with check box , so User can select files and click to save.

Rest all will be handled programtically. Once download is complete the status for that file will change to "Saved" or "Download Complete. I'm working on Window 7, VS2008(C# asp.net). Trying to make it work with WebClient class. It'll be great if you can post some source code or guide me to link or post for solution.

View 2 Replies

Security :: Secure Admin Exception In Website

Jun 10, 2010

I have a secure admin section in my website, only logged in users can gain access to this section, its controlled from the web.config file like this

[Code]....

This has all works perfectly well until now. Ive created a page that has an accordian control on it from the ajax control toolkit, as soon as I place this control on a page and run the web page, I get this error

View 1 Replies

AJAX :: External Javascript Not Called While Calling It From A Control Inside Modal Popup?

Mar 27, 2010

I am getting an error while calling a javascript from a dropdownlist which is placed inside a modal pop-up panel. if i am ebeding a small script like onchange="javascript:alert('hello');", it works fine. But if i m using <script> </script> for embeding a javascript its showing 'object doesn't support this property' error. when i debugged it the compiler does not get into the javascript function.

Below is a screenshot of that page.

View 3 Replies

Javascript - Window.open As Modal Popup?

Oct 14, 2010

I want open window.open as modal popup.

var features = 'resizable= yes; status= no; scroll= no; help= no; center= yes;
width=460;height=140;menubar=no;directories=no;location=no;modal=yes';
window.open(href, 'name', features, false);

I can use Window.ShowModelDialog(), but in my child window I am calling parent javascript method. That is not happening with ShowModelDialog().

function CallParentScript(weburl) {
alert(weburl);
if (weburl != null) {
var url = weburl;
window.opener.SelectUserImageCallback(url);
window.close();
return false;
}
}

If I use window.open(). I can call Parent javascript. But window is not modal. How to solve this? Can I write something in child popup to always top?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved