重定向会话值 [英] To redirect the session value

查看:64
本文介绍了重定向会话值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我的应用程序中,在ajax的更新面板上.在该面板上,我只有几个按钮,文本框和简单的html表,在该表中,我有2个标签.
在一个标签中包含一个图像,另一个包含第二个图像,但第二个
图像是从另一个.aspx页面显示的,所以我在aspx页面中使用了如下代码片段:

<img src="Kata.aspx" />

现在,我正在使用一个会话变量,该变量从原始页面获取一些值
将控件重定向到图像页面,即该页面上的"Kata.aspx"页面,它产生了一些
操作并在原始页面上显示图像.
执行完程序后,当我运行程序时,它显示图像中的值最初为零.因此,如果会话变量中的值第一次发生变化,则不会重定向到"Kata.aspx". /> 要在页面上强制重定向它,我已经使用以下方法进行了操作:

Hello all,

In my application am having on update panel of ajax.On that panel I am having few buttons,text boxes,and simple html table in that table I am having 2 tags.
in one tag consist one image and another consist second image but that second
image is displayed from another .aspx page so i used code snippets in my aspx page as follows:

<img src="Kata.aspx" />

Now i am using one session variable which takes some value from original page
redirect control to image page i.e "Kata.aspx" page on that page it dose some
operation and display the image on original page.
After executing the program and when i run the program it shows the value in the image is zero which is initially take.So if there is change in value for first time in session variable it dose not redirect to "Kata.aspx".
To forcefully redirect it on page i had already done with following methods:

safety_rem1 = da_dt.Rows(da_dt.Rows.Count() - 1).Item(2)
            Session("safety_rem1") = safety_rem1
            Context.Items.Add("safety_rem1", safety_rem1)



但这没用.

因此,我该如何解决该问题?



But it dose not work.

So how can i tackle that problem

推荐答案

据我所知,除非将页面设置为网页,否则您无法将网页指定为图像的来源图片的内容类型.由于不建议更改现有页面的内容类型,因此您应该考虑获取要显示的实际图像,并将其放置在自己的网站上.此时,您可以控制显示哪些图像,并为src属性使用适当的文件名.
As far as I know, you can''t specify a web page as the source for an image unless you set that page''s content type to an image. Since it''s probably not advisable to change the content type of an existing page, you should consider getting the actual images that you want to display, and putting them on your own site. At that point, YOU can control what images are displayed and use the appropriate file names for your src attribute.


这篇关于重定向会话值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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