将值从一个页面传递到另一个页面?

编程入门 行业动态 更新时间:2024-10-27 19:21:46
本文介绍了将值从一个页面传递到另一个页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我执行并提交点击时,如何从一个值传递给另一个值?

How can i pass some value from one from to another from when i perform and submit click?

推荐答案

您可以按如下方式发送它: 假设从一个到两个你想要通过你需要的值。 You can send it as follows: Suppose from from one to from two you want to pass you require values. string value1,value2; int value3,value4; protected void btn_click(objectbtn sender, eventarg e) { from2 obj=new from2(value1,value2,value3,value4); obj.show(); }

在from2中你只需要在构造函数中初始化值并获得这些值。 希望这会有所帮助。 谢谢。

on in the from2 you just initialize the value in a constructor and get those value. Hope this helps. Thanks.

参考这些链接 如何将值传递给另一个表单 [ ^ ] 请将值从一个表单传递到另一个表单 [ ^ ] Refer these links How to Pass values to another Form[^] HOw to pass values from one Form to another[^]

您可以发送您的值,并将其存储为您的常规数据类型: You can send your value and in new for store it to your general data types: string value1,value2; int value3,value4; protected void btn_click(objectbtn sender, eventarg e) { from2 obj=new from2(value1,value2,value3,value4); obj.show(); }

------------------------------ --------------------------------------- 以新的形式这样做:

--------------------------------------------------------------------- In new form do this:

public class form2 { //General Data types string value1,value2; int value3,value4; //cosntructor form2(string value1,string value2,int value1,int value2) { //store it to general data types so you can use it all over your calss this.value1=value1; this.value2=value2; this.value3=value3; this.value4=value4; } }

更多推荐

将值从一个页面传递到另一个页面?

本文发布于:2023-05-25 10:58:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/226671.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:词库加载错误:Could not find file 'D:\淘小白 高铁采集器win10\Configuration\Dict_Sto

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!