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. how to Pass two parameters using Eval in hyperlink in gridview

how to Pass two parameters using Eval in hyperlink in gridview

Scheduled Pinned Locked Moved ASP.NET
helpjavascripttutorialquestion
3 Posts 2 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.
  • U Offline
    U Offline
    unil Dhiman
    wrote on last edited by
    #1

    Hi All, I am facing some problem in passing tweo parameters using Eval in GridView. I tried like this, but there is some javascript error- ]]>' Text= '<%# Bind("AcceptNumber") %>'> //the javascript function-- function OpenDialog(rid,AcceptNumber) { window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ") } when i click on hyperlink in GridView, it shows some havascript error. this error says that the second parameter i passed , is not identified. can anybody tell me how to pass two parameters in a javascript function using Eval. Please help me.

    H 1 Reply Last reply
    0
    • U unil Dhiman

      Hi All, I am facing some problem in passing tweo parameters using Eval in GridView. I tried like this, but there is some javascript error- ]]>' Text= '<%# Bind("AcceptNumber") %>'> //the javascript function-- function OpenDialog(rid,AcceptNumber) { window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ") } when i click on hyperlink in GridView, it shows some havascript error. this error says that the second parameter i passed , is not identified. can anybody tell me how to pass two parameters in a javascript function using Eval. Please help me.

      H Offline
      H Offline
      Herman T Instance
      wrote on last edited by
      #2

      I miss an ; at the end of your :

      window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ") 
      

      Another way is to fill 2 hidden fields within this page through your JS. After filling these hidden fields do a __Postback(...... (search for __Postback). Your page will reload and in your codebehind (.aspx.cs file) you can check if the hiddenfields have a value.

      U 1 Reply Last reply
      0
      • H Herman T Instance

        I miss an ; at the end of your :

        window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ") 
        

        Another way is to fill 2 hidden fields within this page through your JS. After filling these hidden fields do a __Postback(...... (search for __Postback). Your page will reload and in your codebehind (.aspx.cs file) you can check if the hiddenfields have a value.

        U Offline
        U Offline
        unil Dhiman
        wrote on last edited by
        #3

        thaks a lot

        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