Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Beginer problem with ImageButton even

Beginer problem with ImageButton even

Scheduled Pinned Locked Moved ASP.NET
helpquestiondatabasesysadmindebugging
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    papa80
    wrote on last edited by
    #1

    Hi Every body i need help.My question is conected with even OnClick on server side.So i get some PostBackUrl from Db who is change for every postback randomly.When is a clicked botton i go to Redirected page unfortunatly when i click back on web browser my pictures is same but my redirection is diffrent.I put that in if(!PostBack) but now how to store the url for last click and if i have same page in different window??Please help. her is a code //Url who is appear when button is pressed private String sLinkUrl; protected void imgBut_Click(object sender, ImageClickEventArgs e) { if (sLinkUrl == null) { sLinkUrl = Session["Url"].ToString(); } Response.Redirect(@"http://"+sLinkUrl); } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //idBanner int nId; ///Title of banner String sTitle; ///Imagine Url String sImgUrl; //check if GetRandomBanner function have online banner if (ControlAccess.GetRandomBanner(out nId, out sTitle, out sImgUrl, out sLinkUrl) > 0) { //set title imgBtn.ToolTip = sTitle; ///set imagine url imgBtn.ImageUrl = sImgUrl; //Add object to the sesion state Session["Url"] = sLinkUrl; } HttpContext.Current.Trace.Write(ControlAccess.SumBannerImpression(nId).ToString()); } } Best regard N.Nikolov

    when i want to read something good just seat and type it

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups