ASP. Net tips that you may not know, And asp.net tips
<! -- Page number and description -->
1. After submitting the page, keep the position of the scroll bar
You can add the MaintainScrollPositionOnPostback command to the page command.
<% @ Page Language = "C #" MaintainScrollPositionOnPostback = "true" AutoEventWireup = "true" CodeFile = "..." Inherits = "..." %>
2. After loading the page, move the focus to a control. You only need to specify the DefaultFocus attribute of the Form.
<Form id = "frm" DefaultFocus = "txtUserName" runat = "server">
...
</Form>
3. Set the default button of form through the DefaultButton attribute, that is, the button triggered when you press ENTER
<Form id = "frm" DefaultButton = "btnSubmit" runat = "server">
...
</Form>
4. You can use the $ symbol to easily find the control using the FindControl method.
<Form id = "form1" runat = "server" DefaultFocus = "formVw $ txtName">
<Div>
<Asp: FormView ID = "formVw" runat = "server">
<ItemTemplate>
Name:
<Asp: TextBox ID = "txtName" runat = "server"
Text = '<% # Eval ("FirstName") + "" + Eval ("LastName") %>'/>
</ItemTemplate>
</Asp: FormView>
</Div>
</Form>
In the preceding example, the DefaultFocus attribute of form is used to specify the focus control for page loading. You can use the $ symbol to easily locate txtName.
You can also use the following code to easily find the control
TextBox tb = this. FindControl ("form1 $ formVw $ txtName") as TextBox;
If (tb! = Null)
{
// Access TextBox control
}
5. For more information about cross-Page Submission, see the original article.
6. Use a strong type to access members of the MasterPage attribute. For more information, see the original article.
7. You can use the ValidationGroup property of the verification control to specify the group to which the verification control belongs, and specify the verification group to be activated in the ValidationGroup property of the button.
<Form id = "form1" runat = "server">
Search Text: <asp: TextBox ID = "txtSearch" runat = "server"/>
<Asp: RequiredFieldValidator ID = "valSearch" runat = "Server"
ControlToValidate = "txtSearch"ValidationGroup= "SearchGroup"/>
<Asp: Button ID = "btnSearch" runat = "server" Text = "Search"
ValidationGroup= "SearchGroup"/>
....
Other controls with validators and buttons defined here
</Form>
This article is translated. The original Article address is as follows:
Http://weblogs.asp.net/dwahlin/archive/2007/04/17/simple-asp-net-2-0-tips-and-tricks-that-you-may-or-may-not-have-heard-about.aspx
DOTA: You have tips that you don't know.
1. The Invincible flying ax of the animal King can clean up the valley of the ox,
2. tp is not interrupted when you use a briefing account or push the account,
3. in the case of empty blood, the axe King's war hunger and thirst, poisonous drugs, and so on continue to reduce blood, blow yourself up to save a life (if someone is chasing you, blow-up and jump knife can help your opponent ),
4. The shadow-filled network can be pulled for quite a long time.
5. When the tiger jumps, it will not be retained by the vanity mask (but the shadow will be full of the Internet, and the previous phenomenon will occur)
6. Blue fat gives friends a illusion that they can cheat each other's skills (basically, all tricks have been cheated)
7. The bone technique can make the yundun)
8. moles (zombie) can be converted into small animals by magic
9. Captain's mark can bring tp home people back (other similar skills are the same as above)
10. guangfa returned to the butcher at home. When he went back immediately, the butcher hooked a hero and could bring the other party back to his home directly.
11. bonfa's stick has a very high damage to the small black arrow that has been launching the frost arrow (the effect on the skeleton shooter is similar)
12. Some heroes, such as blood demons, poison dragons, and night demons, do not have the skills to keep others, and they must ensure that the tp is in the hands.
13. when you see a shoot bear or a giant playing roshan, you can push the account when roshan is basically empty (it can be a wild store or a forest next to a tower of natural disasters, you can get a roshan in a whitelist and it is estimated that the other roshan will die)
14. The tiger's jump may not be able to jump anywhere. In case of getting stuck, you can pick up your personal head (Blue Cat, white ox, and water man)
15. You cannot add blood to yourself by setting your own magic-free omnipotent power.
16. The distance between the clockwork missiles is full, which can make the hero of the other party's red-blooded death. (The big trick of hunger and soul is also)
17. The Prophet can pretend to send messages to make the other party nervous or even cheat a skill.
18. vs has a vision for the other party's organization, and Xianzhi's shoes can be missed again.
19. vs switch first, and then pick up a hook from the butcher to instantly make the other party dizzy
20. The Butcher may have hooked up the enemy's red-blood hero, but may have pulled back the hooligans of Friends (the layer was rated dota as the most embarrassing moment)
21. The highly toxic and small y snake rods can be attacked by the attacker to other heroes not within the scope of the hero's attack.
22. vs can first dizzy and then change, Dizzy will chase the local hero to run, so after the change is not afraid of dizzy
23. A giant panda or a pat or so on, there is a cast interval, if in the interval (0. A few seconds) be blue (enemy mage, lion, dead spirit book). When blue is not enough to release skills, the skills will be interrupted and you will be disgusted.
24. During the interval (that is, when the three little pandas look backwards), if pushed by white cows, they will change back to their original status, but they will not be dizzy.
25. John's magic can make the other party become an animal immediately. It may be chicken, crab, etc (the speed of each animal is different). lion seems to only make the other party a chicken.
26. When the giant panda was amplified, three little pandas were killed in seconds.
27. I don't have any blood to go home in the early stage. I can ask for help from the wild monster, so I can go that far without it (free time remaining)
28. Tower, roshan, and wild will give priority to attacking the zombie's little botnets.
29. A two-level upgrade may lead the other party to think that you have opened bkb.
30. The tiger's sword can be avoided by pushing the account
31. Small throwing + bombing suicide = unexpected double-kill, three-kill, or more
32. when a hero with blink starts playing the game, let the hero blink go to the high position in the eye. when the other party looks at the video, let the other party throw the other party, friends and heroes will go back to blink (I don't believe someone will start with tp, Xianzhi, unless watermarked). When they come back, they will be thrown up directly. Relying on small landslides or other interrupting skills, they will be able to stop the other party's tp, passers-by may leave in a short time.
33. The ointment will not be interrupted with the effect of continuous blood reduction by the dead spirit method (the ointment will be interrupted after more than 20 damage at a time)
34. Big tidal moves can be taken from the highlands to the lower lands, but not from the lower lands to the highlands.
35. If the wolf is swallowed up in the last day, the Halo will be formed .... (Terrible)
36. If the item column is full, you can buy things at the upper and lower shops (without merging them), the items you buy will be drowned in the store.
37. Account push will not interrupt the video ...... the remaining full text>
Some tips on the classic black forest, but you may not know
Q: Why is it true that I have been a fan of zookeeper in zookeeper? Why is it true? ☆ve?