In general you can get it by using SPFieldLookupValue:
SPFieldLookupValue YourLookup = new (SPFieldLookupValue(Properties.AfterProperties.LisItem["Your lookup"] as string);
In your case the code would become:
dropdwnvalue = web.Lists[properties.ListId].Fields["Names"].InternalName;
String lookupFieldStringValue = Convert.ToString(properties.AfterProperties[dropdwnvalue]);
SPFieldLookupValue lookupFieldValue = new SPFieldLookupValue(lookupFieldStringValue);
Update
int lookedUpItemID = lookupFieldValue.LookupId;
If you want to use both LookupId and LookupValue then you can use SPFieldLookupValue constructor with two parameters
Something like this:
SPFieldLookupValue(1,"Test");