如何将值从文本框传递到app_code中的类 [英] How to Pass value from a textbox to a class in the app_code

查看:87
本文介绍了如何将值从文本框传递到app_code中的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我使用的是asp.net 4.0。



我有一个文本框。我需要在文本框中获取文本并将其传递给app_code文件夹中的类,以便我可以使用此文本在SqlCommand中执行SELECT语句。这一切都在vb中。



请逐步告诉我,因为我是asp.net的新手。附:我正在使用ObjectDataSource

非常感谢。

解决方案

嗯...

  Dim  data  As   String  = myTextBox.Text 
< span class =code-keyword> Dim myClassInAppFolder As new MyClassInAppFolder(data)


Hello. I am using asp.net 4.0.

I have a textbox. I need to take the text in the textbox and pass it to a class in the app_code folder, so that I can use this text to do a SELECT statement in an SqlCommand. All this in vb.

Please show me step by step as I'm new to asp.net. P.S. I am using an ObjectDataSource
Many thanks.

解决方案

Um...

Dim data As String = myTextBox.Text
Dim myClassInAppFolder As new MyClassInAppFolder(data)


这篇关于如何将值从文本框传递到app_code中的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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