如何将数据从javascript文档窗口发送到后面的代码? [英] How to send data from javascript document window to code behind?

查看:84
本文介绍了如何将数据从javascript文档窗口发送到后面的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

我想将一些数据从javascript文档窗口发送到代码隐藏,以便稍后进行操作.

Senerio:[我在代码隐藏中使用ASP.Net 3.5框架和C#]

实际上,我有一个包含一些文本框asp服务器控件的表单,并且每个文本框asp服务器控件旁边都有一个图像按钮.因此,每当用户单击图像按钮时,它将弹出一个JavaScript窗口,其中包含一些客户端输入类型文本框,输入类型下拉框和输入类型按钮,只是为了澄清我将针对图像按钮编写JavaScript代码.用户将填写客户端输入控件,然后单击输入类型保存按钮.我想编写一些JavaScript代码来从javascript窗口中获取这些输入类型字段的值,并将其发送到codehind或server.

我的第一个想法是实施Web服务,但是我将如何从将动态创建的文档窗口中调用Websevice.

请帮我,因为我陷入了困境.如果有人给我一些参考链接或任何想法,这样我可以做进一步的研究,那就太好了.

问候
考萨尔·艾哈迈德
kausar1982@yahoo.com

Hello Friends,

I want to send some data from javascript document window to codebehind so that I can manipulate that later.

Senerio:[I''m using ASP.Net 3.5 framework and C# in codebehind]

Actually I have a form containing some textbox asp server control and there is an image button next to each textbox asp server control. So, whenever user click on the image button, it will popup a javascript window containing some client input type textbox,input type dropdown box and input type button, just to clearify that I will write javascript code against the image button. The user will fill out the client input controls and click the input type savebutton. I want to write some javascript code to grab those input type fields value from javascript window and send it to codehind or server.

My first idea is to implement webservice but how I''m gonna call websevice from document window which will be created dynamically.

Plz help me out, cause I''m stuck in it. It will be great if some give me some reference link or any idea so that I can do reseach futher.

Regards
Kausar Ahmed
kausar1982@yahoo.com

推荐答案

您可以使用ASP.NET AJAX调用WebService,请检查此链接:
http://www.asp.net/AJAX/Documentation/Live/tutorials/ASPNETAJAXWebServicesTutorials.aspx
You can use ASP.NET AJAX to call the WebService, check this link:
http://www.asp.net/AJAX/Documentation/Live/tutorials/ASPNETAJAXWebServicesTutorials.aspx


这篇关于如何将数据从javascript文档窗口发送到后面的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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