Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void DeviceLoop()
- {
- // Select devices from DB
- sampleDataContext dbContext = new sampleDataContext();
- var devicehost = from device in dbContext.Devices
- select device;
- // Loop through devices
- foreach (var host in devicehost)
- {
- // Success - change div class to green/ok colors
- if (PingHost(host.HostIp))
- {
- Div10 = host.HostDiv; // -----> Cannot implicitly convert type 'string' to 'System.Web.UI.HtmlControls.HtmlGenericControl
- Div10.Attributes["class"] = "statusok";
- }
- // Fail - change div class to green/ok colors
- else
- {
- Div10 = host.HostDiv; // -----> Cannot implicitly convert type 'string' to 'System.Web.UI.HtmlControls.HtmlGenericControl
- Div10.Attributes["class"] = "statusbad";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement