Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Reply
How to acess the iframe from an static webmethod
ashok kumar
11 years ago
1.3k
Reply
Hi,
I have written an jquery code to call my webmethod, webmethod is invoking no issue in that, in that webmethod iam not able to add the iframe elements attributes.Iam getting object refrence not set to an instance at run time.pls help me out. in adding the iframe attributes.
aspx code:
<iframe id="IframeZoneBased" runat="server" frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="auto" src="../MasterPage/ListPage.aspx" name="I1" style="width: 400px; height: 210px"/>
cs:
[WebMethod]
public static void loadavailablecabs(string PickupLat, string PickUpLon)
{
BookingPage p = new BookingPage();
p.IframeZoneBased.Attributes.Add("src", "../MasterPage/MiniListPage.aspx?CompanyID=" + "2" + "&LocationId=" + " 1" + "&EmployeeId=" + "2" + "&RoleId=" + "3" + "&LoginID=" + "3");//not working
p.loadtest();
//
}
public void loadtest()
{
IframeCabavailable.Attributes.Add("src", "../MasterPage/MiniListPage.aspx?CompanyID=" + strCompanyid + "&LocationId=" + strGelocationid + "&EmployeeId=" + "0" + "&RoleId=" + strRoleid + "&LoginID=" + strLoginid);//not working
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
MVC error
Using Regex to omit and replace special charecters