﻿// Returns the Jquery object of the element using JQuery to find ASP.NET control ID
getElementObject = function(elementId) {
    // Returns all elements that end with the elementId
    return $("[id$='" + elementId + "']");
}

// Returns the Jquery object of the element using JQuery to find ASP.NET control ID
getElementObjectWithContext = function(elementId, context) {
    // Returns all elements that end with the elementId
    return $("[id$='" + elementId + "']", context);
}

// Returns the element using JQuery to find ASP.NET control ID  - includes context for speed
getElementWithContext = function(elementId, context) {
    // Returns all elements that end with the elementId
    return $("[id$='" + elementId + "']", context);
}

// Returns the value of an element using JQuery to find ASP.NET control ID
getElementValue = function(elementId) {
    // Returns all elements that end with the elementId
    return $(getElement(elementId)).val();
}

// Returns the value of an element using JQuery to find ASP.NET control ID - includes context for speed
getElementValueWithContext = function(elementId, context) {
    // Returns all elements that end with the elementId
    return $(getElementWithContext(elementId, context)).val();
}


// Returns the value of an element using JQuery to find ASP.NET control ID
getElementHTML = function(elementId) {
    // Returns all elements that end with the elementId
    return $(getElement(elementId)).html();
}

// Returns the value of an element using JQuery to find ASP.NET control ID - includes context for speed
getElementHTMLWithContext = function(elementId, context) {
    // Returns all elements that end with the elementId
    return $(getElementWithContext(elementId, context)).html();
}
