| |

VerySource

 Forgot password?
 Register
Search
View: 667|Reply: 4

How to call a custom function in asp.net? ?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

Post time: 2020-3-13 18:30:02
| Show all posts |Read mode
Create a new folder Data under the project file and build a Record.cs class in it
How to call this class in the page Default.aspx
? ?
Reply

Use magic Report

0

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-6-9 23:45:01
| Show all posts
You can call it directly like the namespace,
Reply

Use magic Report

0

Threads

64

Posts

45.00

Credits

Newbie

Rank: 1

Credits
45.00

 China

Post time: 2020-6-10 09:30:01
| Show all posts
First of all, the class should be public, refer to the named control, instance class of that class, and call the method name with the instance.
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-6-10 12:45:01
| Show all posts
Record.cs should be placed under App_Code file or APP_Code subdirectory.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

 Author| Post time: 2020-6-18 13:00:02
| Show all posts
First of all, the same namespace does not work
, And secondly if I don’t want to put it under App_Code
It is placed under a Data built by myself
? ?
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