This will help you to get vast Markup (XML) in string format for video player Adspot where developers have their own players to play video Ads.
The below snippet shows the example of requesting Vast MarkUp Ads.
// Initialize the adview object with proper adspot id and ux type and then call
// CacheAd() api.
VMAXAdView adView = new VMAXAdView();
adView.AdspotId = "MY_ADSPOT_ID";
//Once ad has been caached successfully, initialize the VastAdObject as follows.
private void AdView_AdCached(object sender, EventArgs e)
VastAdObject adobj = adView.vastAdObject;
if(adobj != null)
string str = adobj.GetVastResponse();