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:
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
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
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
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
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
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
Oct 24, 2010
[Code]....
View 4 Replies
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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++)
{%>
<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