| |

VerySource

 Forgot password?
 Register
Search
View: 1223|Reply: 11

Please give me ideas

[Copy link]

3

Threads

15

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-3-2 14:30:02
| Show all posts |Read mode
I want to make a page with the name entered in TextBox. After submission, I can find the user information in the database and display it in the DataGrid. I have done all the things I said above. What I want to do is to enter the name again. After submission, the first and second records found in the DataGrid are displayed, and so on ... What should I do?
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-5-13 08:45:01
| Show all posts
What about the third and fourth time? This page will get bigger and bigger.
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-5-13 11:00:01
| Show all posts
The implementation method is very simple, add the conditions of each query to viewstate, use or to write them to the sql condition when querying.
Reply

Use magic Report

0

Threads

14

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-5-13 11:15:01
| Show all posts
Record the "user name" of each query result in ViewState on the page, after each input of the user name, combine with the recorded user name and then query
Reply

Use magic Report

3

Threads

15

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

 Author| Post time: 2020-5-15 16:15:01
| Show all posts
Oh, thank you in advance. Can you give an example of Sql, do not know the Sql statement do not know how to write
Reply

Use magic Report

3

Threads

15

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

 Author| Post time: 2020-5-16 08:45:01
| Show all posts
Is it written like this:

this.ViewState ["卡号"] = this.CardNumberTextBox.Text;
using (CardAccess ca = new CardAccess ())
{
      cards = ca.GetCardByNumber (this.ViewState ["卡号"]);
}

But my Sql statement does not know how to write
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-5-17 09:30:01
| Show all posts
this.ViewState ["卡号"] + = this.CardNumberTextBox.Text + ",";

Then use, divide into arrays. Then generate sql
Reply

Use magic Report

3

Threads

15

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

 Author| Post time: 2020-5-17 20:00:01
| Show all posts
How to divide into arrays? Ha ha
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-5-18 06:15:01
| Show all posts
string [] ary = str.split (',');
Reply

Use magic Report

3

Threads

15

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

 Author| Post time: 2020-5-18 18:00:01
| Show all posts
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list