How To Create A Fake URL When Displaying A Page

Mar 7, 2011

I remember doing something like this in a CMS i used few years ago.. not sure what it was called or considered. Maybe its url aliasing, but not sure but here is what im trying to accomplish, based on the url / post data passed that a physical location is returned to our application.

So the url will always be unique to the request, but it will never be a valid url that will display anything..

The concept here is that we have the following structure.. We have the C# code that will initiate a HTTP request of a file (test.dat) IIS7 already has a handler setup for that file, when it receives that request, it does a DB lookup and returns the physically location on the server for our application to use.

So is there a way to send a fake http request to our server so that the custom handler is triggered Im not sure if i explained this correctly, but hopefully i did..

The application we are working on is a custom video playback app, IIS has been setup with the handler for the .dat file we are working with.. the video playback will need the entire physical path in order to play.. as far as the site is concerned, it just needs to initiate the request..

[URL] would be an exaple of the request.. but somehow passing along in the background video specific information in order to return the correct path.

View 5 Replies


Similar Messages:

Configuration :: Displaying Fake Url In Address Bar?

Aug 4, 2010

I am working on an ERP Application as a software Developer.

For security reasons, I want to display same url on web page's addressbar.

i.e. If user clicks on any internal link of application, URL shown in addressbar should not be changed.

It should be static like www.example.com for every page of the application.

View 3 Replies

C# - How To Fake HttpContext For Unit Tests

Aug 15, 2010

I need to fake HttpContext.Current.Application table to access it from my unit tests.I need to store my data somewhere. I thought that I can just pass instance of NameValueCollectionBase but as I descover this base type has no indexer so it's too complicated to use. So what about faking this part of HttpContext? Is it possible? How can I make it? Will be NUnit.

View 2 Replies

Fake Image Using .aspx Url To Track Email Views In Outlook, Doesn't Work

Apr 15, 2010

I have this in my HTML email to track if someone views the email in say Outlook.

<img src="http://www.example.com/track.ashx?user=3434" />

but this doesn't seem to work.Should I change my headers in the .ashx to server image headers? Can this work using this method?

I emailed myself with an email, other images displayed properly. There was no log in the database for the handler (the handler logs all requests to the db). Calling the URL to the file in the browser logs to the db, so its working.

View 2 Replies

Page Layout Is Not Displaying Properly In QA Machine But Is Displaying Correctly In Dev Machine

Apr 21, 2010

ASP.Net Page layout is not displaying properly in QA machine but is displaying correctly in Dev Machine. What could be the issue? We are using ASP.Net 2.0

View 1 Replies

Way To Create A Row In An ASP Table Displaying The Filter

Jun 8, 2010

making my own filter page for a gridview and have ran into. When the user clicks on the add filter button, I create a row in an ASP table displaying the filter. The filtering works correctly and adds the row to the table. But att the last cell is a button that is created when the row is added to delete the filter. For some reason the delete button will not fire the event ive created for it. Any suggestions? Code that creates the tablerow and button.
private void BindDtToTable()
{
// Get the DataTable from Session
DataTable dt = (DataTable)Session["MyDt"];
// Loop through the rows
foreach (DataRow dr in dt.Rows)
{
// Create a table row
TableRow tr = new TableRow();
tr.ID = dr["id"].ToString();
[code]...

View 3 Replies

MVC :: How To Get The Dropdownlists (for UserId And Employee Type) Displaying In My Create View

Jan 20, 2011

I am working on an application that has two tables (amongst others) that are related by a Guid Foreign key. The parent table for this guid key is the aspnet_users table and the child table happens to be my employees table which has amongst other columns EmployeeID, FirstName, LastName, EmployeeType, NationalID etc. ant the referenced UserId column from the parent table. I have managed to get the dropdownlists (for UserId and Employee Type) displaying in my create view but have failed to have it create an employee since the guid value from the Dropdown list for UserId cannot bind when posting the form data. I am using Entity Framework 4 , VS 2010 and .Net 4

View 6 Replies

Forms Data Controls :: Checkbox Displaying, To Create A Row Check Type Of Event?

Oct 24, 2010

[Code]....

View 4 Replies

MVC :: Handling Unauthorized Page User Requests By Displaying A NoAccess Page?

Apr 12, 2010

I have implemented a custom ErrorController with NoAccess Action returning the View "~/Error/NoAccess" (not inside the Shared folder).

I have also modified the web.config file and add a custom error "<error statusCode="403" redirect="~/Error/NoAccess" />" node.

Each time i enter to an anauthorized page, i get redirected to the logon page (even though i am already logged on). I would to modify the default asp.net mvc authorization functionality and each time a user tries to enter a page that is not authorized to get an "NoAccess" page instead of redirecting to the login page.

View 7 Replies

Displaying Custom Error Page From A Nested Master Page Using Mvc

Oct 27, 2010

I am showing Custom Error in my page.. if somehting happend wrong. but if the same error occured in my subview master page I am not able to show the Custom error page on Entire page its showing me that Error page under subview master page. Please I am attaching the Screen shot. how to show the Error page on entire page if something happend in any where submaster or other page.. Here is the code that I am using in web config file to show custom Error page..

<customErrors mode="On" defaultRedirect="~/Home/Error">
<error statusCode="403" redirect="~/Home/Error" />
<error statusCode="404" redirect="~/Home/Error" />
</customErrors>

master page I have all the js files and Css files links and I have submaster page for mainmaster page.. sub master page have three tabs each tab has grid control.if something went wrong I can able to show the Custom Error page but its showing me in submaster page.. not in main master page.....but if something hapend any where I need to show CustoM Error page in main master page..

View 1 Replies

Configuration :: Not Displaying The Custom 404 Page Instead It Display The IIS6 404 Page

Dec 3, 2010

I set my web.config with a custom error for 404 and 403 response but when I try to navigate my page (not exist page). It displays the default IIS6 404 page instead of my custom page...


[Code]....

View 5 Replies

Web Forms :: Master Page Layout Not Displaying On Content Page?

Mar 27, 2010

I am new to ASP.NET development and I am running into an issue using master/content pages. I have a master file that basically defines all of the layout for my site. The only thing that the content pages are supposed to display is some very basic text/images/html, made available by one ContentPlaceHolder control in the master file.

My problem is in the display. When I view the content page, none of the layout that should be inherited from the master page is displayed -- I end up with just a 'blank' page. What seems odd, is that if I look at the Design View in VS 2005, the content page appears to show the layout that is defined in the master. Here is a sample of the source for the master and one of the content pages...

Master Page: content_pages.master
<%@ Master Language="VB" CodeFile="content_pages.master.vb" Inherits="content_pages" %>
<!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">
... links to CSS & Javascript files here (removed for simpler display in this post) ...
</head>
<body>
<form id="form1" runat="server">
<div id="content_holder">
<div id="content_background_top"></div>
<div id="content_background_middle">
<div id="header">
<div id="menu">... Menu Item Code (removed for simpler display in this post) ...</div>
</div>
<div id="gray_fade_bar"></div>
<div id="site_page_main">
<asp:ContentPlaceHolder id="PageContent" runat="server"></asp:ContentPlaceHolder>
</div>
<div id="footer">Footer Text Here</div>
</div>
<div id="content_background_bottom"></div>
</div>
</form>
</body>
</html>

Content Page: locations_odessa.aspx

<%@ Page Language="VB" MasterPageFile="~/content_pages.master" AutoEventWireup="false" CodeFile="locations_odessa.aspx.vb" Inherits="locations_odessa" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">
Page content will display here.
</asp:Content>

View 3 Replies

Creating Search Page And Displaying Results On Different Page?

Apr 1, 2010

I have created a search page using Visual Web Developer and Access as the database. Instead of displaying the results from the search in Gridview on the same page what would be the coding to pass the results to a new page titled "Search Results".

View 4 Replies

Displaying Text Entered On 1st Page Onto The 2nd Page?

Mar 17, 2010

This is my 1st ASP.Net project.

I have created a new ASP.Net project in Visual Studio 2008. I have 1 textfield and 1 Submit button. When I type some text and hit Submit, the text gets displayed on the same page below the TextBox and Submit button.

How do I display this text on a new page. I tried using Add New Item > Web Form. This creates a new webpage (Default2.aspx) What needs to be done to display the text entered on Default.aspx to be displayed on Default2.aspx ?

View 10 Replies

C# - How To Create Create Variables / Properties In Master Page And Let Sub-pages Access Them

Apr 14, 2010

How to create create variables/properties in master page, and let sub-pages access them? So my master will have a string property HomeUrl How can any page that uses the master page access this property?

View 2 Replies

Web Forms :: Create Multiple Masterpages And Create A Handler To Dynamically Set The Correct Master Page?

Feb 18, 2011

I'm currently in the process of creating a webshop. This webshop supports theming, but I also want customers to choose a lay-out. I can create multiple masterpages and create a handler to dynamically set the correct master page. But some components, like the shopping cart, are controls which have to be present in the master page and are also used in the aspx pages. The shopping cart control for instance, has an Update method which is called whenever the user adds a product to their cart. So the question is: can I somehow create a default masterpage which has all the components on it, but still be able to create multiple lay-outs. And how should I reference that master page from the aspx pages? I also thought of creating an Interface class which defines the masterpage and it's public components, but I don't know if I can reference an interface from aspx pages.

View 8 Replies

Web Forms :: How To Create A Form To Create An Ascx Page And Code Behind For It

Sep 15, 2010

Is is possible to build a form, accept parameters and from THAT construct a new .ascx page AND the code behind for that page? What I'm proposing is having some code snippets that just need parameters added and can then be used to create a web user control that can be added to existing pages. This .ascx file would be a real file after creation, not dynamic every time.

View 1 Replies

Forms Data Controls :: Can Create A Gridview With Twitter Like Load More Button For Displaying Next Set Of Data

Nov 27, 2010

In one of my application, I have around 2000 records which i am displaying in gridview with normal paging.

Now I want to change this paging facility and would like to show a "more" button at the footer(just like [URL] has). The moment user clicks it, the next set of data will be retreived. This will go on till all the records are fetched.

View 8 Replies

Web Forms :: Displaying A Page Over Another Page?

Aug 25, 2010

I have a requirement something like On clicking a link on a page another page will open dymanically on that page only.the page will be like module popup where clicking a certain link download of documents will take place with out postback.The page can be iframe which can be manipulated with java script to place in centre

View 1 Replies

Displaying Sql Data On A New Page?

Jun 21, 2010

I have a dropdown on an ASP page where user can select a product, I then want them to be redirected to a new page displaying the information to the chosen product. What is the easiest way I can do this?

View 5 Replies

Displaying Several Pages In One Page?

Jan 31, 2010

I would like to make a dynamic page that presents several pages in a single page. Using frames is well known technique for this, but many web professionals are advising to avoid frames - it has many problems with different browsers and different window sizes.

Do you know any other technique that can display several pages in one?

View 11 Replies

C# - Printing A Page Without Displaying It?

Jul 27, 2010

I have a page from which the user will be able to print. However, the page which will get printed is not the one the user is viewing, but rather a new one I'd like to generate on the background and (possibly) only show the print dialog for it.

Just to make things clear:User is on "View.aspx" and clicks my Print button (not the browser's one).The Print button loads the content of "Printable.aspx" and displays a print dialog for it while the user is still on "View.aspx".

FYI, what I'm trying to avoid is to have the "Printable.aspx" open in a new window and then show its print dialog.

View 4 Replies

Displaying Video On A Web Page?

Jun 12, 2010

I have to display the Video on my own Asp.net web Page . Can any body have experince of thistask before kindly share the ideas mean what are the steps to play the video on Asp.net Page.Which control i have to use for displaying the video ?

View 6 Replies

C# - Displaying Two Web Pages On One Page

Sep 17, 2010

i am not saying its difficult but i would like to know what way is used professionally. what i do is declare iframes from html code and assign a scr to it, but the problems are switching the html code each time for declaration the size of frame does not change/ adjust with the page in it, scroll bars do appear but thats not it

View 3 Replies

ADO.NET :: Displaying Linq In Web Page

Sep 18, 2010

I have gotten as far as joining tables successfully (three of them, no probs) and have placed the data in a "var course_units", which is then passed to the view with the statement:

// Create the view model
var viewModel = new CourseViewMapViewModel()
{
Categories = categories.ToArray(),
NumberOfCategories = (course_units.Distinct()).Count(),
Course_Units = course_units.ToArray(),
Weekly_Hours = weekly_hours.ToArray(),
Total_Hours = total_hours.ToArray(),
};
//Return the view
return View(viewModel);

Each element in the array holds 5 values, namely "National_ID", "SIN" etc. Now the first question: When I display an array element, the coloumn header gets added, which I don't want. How do I get it to not display it? My current ASP.NET looks like this:

<% for (var x = 0; x < t; x&#43;&#43;)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {%>
<td>
<table border="0">
<tr>
<td>
<%: Html.Encode(Model.Course_Units.GetValue(x)) %>
</td>
<td>
<%: Html.Encode(Model.Total_Hours.GetValue(x))%>
</td>
</tr>
</table>
</td>
<%} %>

The idea being that a <td> will display all of the values in Course_Units, one array element at a time. The current output is: { National_ID = ICAB4225B, SIN = D0057, Unit_Name = AUTOMATE PROCESSES, Acronym = SCR1, Core_or_Elective = Core IV }

Second question: If I wanted to select just the "National_ID", how do I do that? I've been searching the internet for a couple of hours now, no luck, more blame on me being a complete newbie, I think.

View 1 Replies







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