TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ashok kumar
NA
89
36.1k
How to acess the iframe from an static webmethod
Aug 21 2013 6:11 AM
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
Reply
Answers (
2
)
Foreach, Error
Using Regex to omit and replace special charecters