Web Forms :: Ad Displaying Ad In New Page?
Aug 30, 2010
i used ad rotator to show ads in my project , i calculated the number pf clicks in separate page , my coding is as below
if (Request.QueryString.Count > 0)
{
oAds = new OMSAdManagement();
int id = Convert.ToInt32(Request.QueryString["ID"].ToString());
oAds = SiteBase.GetAdsbyAdID(id);
if(oAds.MaxNumberofClick !=0)
{
if (oAds.NumberofClick < oAds.MaxNumberofClick) SiteBase.UpdateAdClicksbyAdID(oAds);
else
{
oAds.IsActive = false;
SiteBase.UpdateAdActivebyAdID(oAds);
}
}
string st = Request.UrlReferrer.ToString();
Response.Redirect(st, false);
Response.Write("");
}
i want to redirect to same page after updating the number of clicks , and wand to show adds in new window, but i cant do the both , only one line is workin this string st = Request.UrlReferrer.ToString(); Response.Redirect(st, false); or this Response.Write(""); not the both how can i solve the problem.
View 1 Replies
Similar Messages:
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 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
Mar 30, 2010
In my web application, i need to display Images(.jpg,.tif,.png,.bmp etc.,) and also Text Files(.txt,.doc,.xml,.html etc.,) in the web page. Can you suggest me, the best way to do this? NOTE: The Web Page should be compatible with Mobiles Phones(Iphone, Android)
View 5 Replies
Dec 6, 2010
I would like to create a login form, after logining in i would like the name of the person login in to display in a welcome message on the second page.
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
Apr 11, 2010
I have a asp radiobutton on my page and when I display the page it appears that the border for he radiobutton is 50px and the text for the radiobutton is shoved down to the next line. I have the markup for the radiobutton below. When I use a standard HTML radiobutton it appears correctly on the page. See markup below:
[code]...
View 5 Replies
Sep 23, 2010
For certain parts of the site the allow inserting and updating of data we have some try / catch logic in place.. Now we would like to display a custom error page explaining what didnt happen. Instead of just a generic message that says error occurred. Here is 1 error that is generated due to Primary Key constraints, we woudl like to redirect them to our error.aspx page which is already setup and configured in the web.config but within that page display a more user friendly detail message of why they got the error. In the example below, we may want to say, "There was an error with the "Access Insert" please make sure that the values you entered on the previous page are unique" thats just an example, but gives an idea of what we are trying to do.
[Code]....
View 4 Replies
Mar 3, 2011
I need to display video in my webpage. For that am binding filename, hyperlink in grid and when user clicks hyper link am opening the video in another page using javascript.
hlnkSchedule.Attributes.Add("onclick", "javascript:window.open('" + v + "');");//,'sPlayer','location=0,status=1,toolbar=0,resizable=0,width=300,height=200');");
Instead of this I want to opeing video in the same page in different location using div tag.
View 1 Replies
Mar 2, 2010
I am rewriting a website for a company who want to keep the existing stock listing format of asp pages pulling info from an uploaded access database. I have left all the asp code alone, just changed the html around it to accommodate a better (albeit not perfect) design than previously used. I have also been adding items to the database exactly the same way the staff do it now.
However, when I view the pages, there is no content, only the html "wrapper". I get the error message displayed where the content should be: "An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error."
I am running IIS on my local machine and as far as I am aware, it is configured correctly. I can view asp pages that do not request content from the database fine.
Pages are served on my local machine under
c:inetpubwwwroot
Database is served under
c:inetpubdb
View 1 Replies
Feb 24, 2010
I need to query a database and return list of names, then I need to display their pictures and information in a Web Page, using ASP.NET or using JavaScript. The main concern is displaying the pictures and information dynamically on the page in an organized way.
View 5 Replies
Mar 31, 2010
I am working on a project, and I wish to use a master page. I want to experiment with it first. I add a master page; then, I add a default page. I copy some text and paste it in the default page, and I type this is the master page on the master page. When I run the project, the text in the default page always appear on top. How do I get the data on the default page to display to the right of the page, and the text on the master page to appear to the left.
Also, I tried it using menu. I got the same result. The menu was on the master page, but it was displayed at the bottom of the default's page text. I added three pages and was able to naviage between the pages. When I navigated to the second page without text, the menu appeared on the left. I added some text to the second page, and it does the same.
View 2 Replies
Nov 22, 2010
Is it possible to display a string on the page itself without the use of a Label, i did try <%=FullName %> but it gives me a error.
Heres my code behind.
[Code]....
View 12 Replies
Apr 9, 2010
From couple of days i am trying to display a you tube video in my aspx page.but i am facing some problems.
When i started this i thought that this will be very easy task,because i thought that i will have to paste the embed code from you tube and thats it.Now i think its not that simple
Here's what i did
i opened you tube and opened a videos cliked on embed button and copied then embed code and then pasted in my webform.
Run the application and i saw the thumbnail clicked on the play button but got the error
"an error occured please try again later" and this continues forever.
where as the video works perfactly fine if opened from you tube website
[Code]....
View 3 Replies
Feb 15, 2011
What would be the most efficient way to inject just the contents of an html page into a user control or directly into a page?
In example if the html page I'm calling consists of a simple <div> layout how could I display that within an aspx page.
View 5 Replies
Nov 22, 2010
I've been trying to figure out the issue and knowone seemd to know. I put a dropdown on my page and when I view it from my server, it works fine. When I tell it to go and get it's values from a DB I can no longer see it on the page when I view it from the server. Here's the code I have for it:
<td
class="style28">
<asp:DropDownList
ID="DropDownList2"
runat="server"
DataSourceID="AccessDataSource1"
DataTextField="Team"
DataValueField="ID">
</asp:DropDownList>
<asp:GridView
ID="GridView1"
runat="server"
AutoGenerateColumns="False"
DataKeyNames="ID"
DataSourceID="AccessDataSource1"
EmptyDataText="There are no data records to display."
Visible="False">
<Columns>
<asp:BoundField
DataField="ID"
HeaderText="ID"
ReadOnly="True"
SortExpression="ID"
/>
<asp:BoundField
DataField="Team"
HeaderText="Team"
SortExpression="Team"
/>
</Columns>
</asp:GridView>
<asp:AccessDataSource
ID="AccessDataSource1"
runat="server"
DataFile="App_DataIRISBS.mdb"
SelectCommand="SELECT [ID], [Team] FROM [tblTeam]"></asp:AccessDataSource>
</td>
View 21 Replies
Jan 3, 2011
Normally I dont have the login link in the master page. But I have the labels to display the user information on top of master page once logged in and have the sign in option in content page which contains that master page. After sign in , i want to display the user information on the top of the master page without redirecting user to the same page? How can we do this?
View 5 Replies
Oct 3, 2010
I want to display gif image when a page is loaded...I have a dropdown list when this is selected Gridview is populated with data from database..I want to show a gif image when this gridview is populated...how to implement this without AJAX...
View 5 Replies
May 29, 2013
How to display pdf file in browser with in the table tag. the file is located in different database that we need to access.
View 1 Replies
Jul 5, 2012
i use this code to display my image from database
[URL]
i test it in one page it work correctly but when i want use it in product.aspx page it didn't show image i think in my page there is some code that prevent to showing image from database but i can't find it
<tr>
<td align = "center"><asp:image ToolTip = "ASP Image Control" ID="Image13" runat="server" ImageUrl ="imageH.aspx?ImageID=48" Height="156px" Width="174px"></asp:image></td>
View 1 Replies
Feb 3, 2011
i have an html editor where a user can put in some text.the thing is that when trying to display this text on a different page results in displaying the html that was saved by the editor.i want to display the text in a text box (if possible), with the special attributes(bold, itali etc.i currently get the text with the html tags.
View 5 Replies
Jan 29, 2010
I want to insert a record in the gridview and i have designed it as the fig: below shows.
Initially there is no data in the datatable to which the gridview is bound to,so the gridview is not displayed when the page load,ok
I want to ask that is it possible to display Gridview on page load with only the header and the footer?
i.e;the user can see the header names and the textbox and drop down list at the foorter so that they can insert data in the grid?
View 4 Replies
Oct 14, 2010
I have a webpage which displays content drawn from a single record in a database table. I've been asked to change this so that the content displayed alternates between 2 records each time the page is requested by a browser (I guess this would equate to each PageLoad event).
The records to be displayed are chosen on the basis of two dates, a beginning date and and ending date, that define a time period in which the record is to be active. The table containing these records has 2 columns containing these dates (begin date is contained in "dtDisplay" and end date is "lastDisplay."
I'm not sure how to amend the existing code behind to make this happen. Here is the c# that I inherited from a developer who is no longer available.
[Code]....
View 13 Replies
Mar 18, 2011
I want in my datapager to have something like displaying (page x of xx). I have done a research and I found this code which in C#.
[Code]....
But the problem is, my site is using VB as the code behind and I don't know how to convert it to VB code.I have tried using [URL] but it does not work.
View 1 Replies
Mar 22, 2010
I have a Java Script popup messae box that is displayed when an application user first displays the web page. Everything works great, but when the popup displays the background of the screen is white, with the popup in front of it. Instead I would like for the popup to be displayed in front of the web page after it has been rendered with all of the controls on it.
<%@ Page Language="C#" codebehind="Default.aspx.cs" inherits="Colso.Site.Default" masterpagefile="~/Master.Master">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script language='JavaScript'>");
sb.Append("alert('message to client')");
sb.Append("<");
sb.Append("/script>");
ClientScript.RegisterStartupScript(this.GetType(), "PopupSb", sb.ToString(), false);
}
</script>
<asp:Content id="contentPage" runat="server" contentPlaceHolderRoot">
// Controls not shown because I don't want too many lines
</asp:Content>
View 5 Replies