15,919,422 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 11683406 (Top 15 by date)
Member 11683406
1-Jun-16 2:47am
View
Hi tadit in my page load event tenacyaddress field is identified . But static method having the problem
Member 11683406
1-Jun-16 2:42am
View
Hi Tadit my ajax script is in another page . Here is the flow of my page we have two pages and In first page we are using ajax request to sent which link the user clicked and in web method is in the second page . It will get the id and shows the value in the text box . so returning back the data to js wont be work on this situation
Member 11683406
31-May-16 12:52pm
View
Yes the ajax method is from another page
Member 11683406
31-May-16 7:51am
View
Hi Chill my ajax code is function send(propid) {
$.ajax({
type: "POST",
url: "Default.aspx/LookupUpdate",
data: '{id: "' + propid + " ,tb : 'TenancyAddress' }",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
alert(response.d);
return false;
}
});
}
Member 11683406
31-May-16 7:48am
View
hi Tadit flow is we have two pages and In first page we are using ajax request to sent which link the user clicked and in web method is in the second page . It will get the id and shows the value in the text box . so returning back the data to js wont be work on this situation
Member 11683406
31-May-16 7:36am
View
yes i did in both ends but it return error method return error as Invalid web service call, missing value for parameter:
Member 11683406
31-May-16 7:26am
View
hi Tadit i will try your method now
Member 11683406
31-May-16 7:25am
View
Chill i tried your method but the method return error as Invalid web service call, missing value for parameter: . Thanks For your help
Member 11683406
31-May-16 4:56am
View
thanks let me check and let you know
Member 11683406
31-May-16 4:48am
View
from another page via ajax request
Member 11683406
31-May-16 4:38am
View
[WebMethod]
public static void LookupUpdate(string id)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ToString());
con.Open();
SqlCommand cmd = new SqlCommand("select * from [godaddy].[dbo].[Property] where [Prop_id] = " + id, con);
SqlDataAdapter sda = new SqlDataAdapter();
cmd.Connection = con;
sda.SelectCommand = cmd;
DataSet ds = new DataSet();
sda.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
Page page = (Page)HttpContext.Current.Handler;
TextBox TenancyAddress = (TextBox)page.FindControl("TenancyAddress");
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
string property = ds.Tables[0].Rows[i]["PropertyName"].ToString();
fill(property);
}
}
con.Close();
}
Member 11683406
31-May-16 3:09am
View
Is this possible to set the Text box property inside the static method ?
Member 11683406
31-May-16 3:05am
View
Hi Chill yes the name is correct and i think the name is not a issue Visual Studio is complaining about that am using the static method to set the property of the textbox and return error as an object reference is required to access non-static member
Member 11683406
31-May-16 2:31am
View
Hai Chill your are correct the TenancyAddress is Null . But in my Page Tenancy address is a asp textbox and when am directly set the text property like this TenancyAddress.Text = property; it shows error as an object reference is required to access non-static member
Member 11683406
30-May-16 18:19pm
View
Hi this line am getting error TenancyAddress.Text = property;
Show More