Asp.net updates the client-side Injection Table, which involves security issues. Therefore, it is impossible to retrieve and update the client-side. In this case, the user can only retrieve and update the phone number Injection Table.
Using Microsoft. Win32; /// <Summary>
/// Get the email name
/// </Summary>
String Scomputername = System. environment. machinename;
// Note the path "SOFTWARE \ cmweb" in the examples table 」
Const String Sregistrypath = @" Software \ cmweb " ;
1. Orders are used to add the orders table. /// <Summary>
/// See the content in the "Notice" table.
/// </Summary>
Void Getregistry ()
{
// Open a designated Injection Table
Rkkey = Registry. localmachine. opensubkey (sregistrypath );
If (Rkkey ! = Null )
{
// See the content in the "Notice" table.
String Sregistryvalue = Rkkey. getvalue (sregistrykey, "" ). Tostring ();
}
}
2. Create a sequence table /// <Summary>
/// Volume creation and attention table content
/// </Summary>
Private Void Createregistry ()
{
// Obtain the master region of "HKEY_LOCAL_MACHINE \ SOFTWARE ".
Registrykey rkrootkey = Registry. localmachine. opensubkey ( @" Software " , True );
If (Rkrootkey ! = Null )
{
// Create cmweb when cmweb does not exist
If (Array. indexof (rkrootkey. getsubkeynames (), " Cmweb " ) < 0 )
{
Rkrootkey. createsubkey ( " Cmweb " );
}
// Obtain "HKEY_LOCAL_MACHINE \ SOFTWARE \ cmweb ".
Rkkey = Registry. localmachine. opensubkey (sregistrypath, True );
If (Rkkey ! = Null )
{
// Email name
String Sregvalue = Scomputername;
//Shard creation value
Rkkey. setvalue (sregistrykey, sregvalue );
}
}
}
3. Update the notebooks table
/// <Summary>
/// Update the notebooks table
/// </Summary>
Void Updateregistry ()
{
// Obtain the master region of "HKEY_LOCAL_MACHINE \ SOFTWARE ".
Registrykey rkrootkey = Registry. localmachine. opensubkey ( @" Software " , True );
If (Rkrootkey ! = Null )
{
// Cmweb creation does not exist when "cmweb" expires
If (Array. indexof (rkrootkey. getsubkeynames (), " Cmweb " ) < 0 )
{
// Shard name
Rkrootkey. createsubkey ( " Cmweb " );
}
// Obtain "HKEY_LOCAL_MACHINE \ SOFTWARE \ cmweb ".
Rkkey = Registry. localmachine. opensubkey (sregistrypath, True );
If (Rkkey ! = Null )
{
// Email name
String Sregvalue = Scomputername;
// watermark creation watermark value
rkkey. setvalue (sregistrykey, sregvalue);
}< BR >}