public static void TrustedForm()
{
char doubleQuote = '"';
if (ViewState["OfferID"].ToString() == "992")
{
trustedFormScript = "<script src=" + doubleQuote + "http://api.trustedform.com/trustedform.js?field=trustedformfield"
+ doubleQuote + " type=" + doubleQuote + "text/javascript" + doubleQuote + "></script>";
}
}
public partial class Offer : BaseForm
{
public partial class Admin_EditCompaign : System.Web.UI.Page
{
protected void btnUpdate_Click(object sender, ImageClickEventArgs e)
{
ImageButton oButton = (ImageButton)sender;
if (oButton.ID == "btnUpdatePostingSetUp")
{
if (ddlMethod.SelectedValue != "File")
{
if (txtClientPostURL.Text.Trim().Length == 0)
{
}
}
}
if (IsValid)
{
SaveData();
SetTabVisibility(true);
}
SelectTab(oButton.ID);
if (chkTrustedForm.Checked)
{
}
}
}
}
What I have tried:
I have declared the method
public static void TrustedForm()
above existed if condition in
Offer.aspx.cs
page.
I want to call that method in
Admin/EditCampaign.aspx.cs
page.
Problem is I dont get intellisense to call
Offer.TrustedForm()
in EditCampaign page and get error:
A namespace cannot directly contain members like fields or methods
in Offer page
Tried using static and without static declaring the instance still no use. Please assist me on this.
Code above shown: trustedform method in offer page , top part of offer page, top part of Admin/editCampaign page and place where I want to call the method
if (chkTrustedForm.Checked)
{
}