如何将单个查询字符串值同时发送到两个或多个页面 [英] how send single query string value into two or multi page at same time

查看:64
本文介绍了如何将单个查询字符串值同时发送到两个或多个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

How to send single query string value into two or multi page at same time?

The scenario that I have done is this.
I have 3 pages
first page:Default page: in this page which is contain of a gridview, i want that when click on one of the grid view listed data the id of this page wich is Elan_id should be send to another two page like( adverdetails.aspx) and **(finaltest.aspx).**
I have done something like this but its not working.

<asp:HyperLink ID="HyperLinkshowtitle" style="font-weight:bolder;" NavigateUrl='<%# ("~/gen_Adver_Details.aspx?gid=" + Eval("Elan_id") + "~/final_test.aspx?gid=" + Eval("Elan_id"))  %>' runat="server" Text='<%# Eval("Title_dari") %>'></asp:HyperLink>

please if its posible give complete guid with an example

推荐答案

我的解决方案只是通过Session对象传递参数。



但你可以:

- 使用其中一个持久对象(会话,视图包等)

- 使用javascript / jQuery将src属性添加到占位符iframe,当你的第二页加载时只需将src添加到iframe

- 使用文字控制 [ ^ ]

- 更改设计,而不是iframe,将页面的内容注入同一页面中的div(这很挑剔,我不会这样做,没有很好的理由)
My solution would be simply to pass the parameter through Session object.

But you can:
- use one of the persistant objects (session, viewbag, etc)
- use javascript / jQuery to add src attribute to placeholder iframe, when your second page loads just add src to iframe
- use literal control[^]
- change the design, instead of iframe, inject the content of the page to div in the same page (this is finicky and I wouldn't do it this way without very good reason)


这篇关于如何将单个查询字符串值同时发送到两个或多个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆