Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 24th, 2009, 02:38 AM
Kirti.darji
Guest
 
Posts: n/a
Default use web control in static method

hi


use web control in static method?


regards
Kirti Darji
  #2 (permalink)  
Old August 24th, 2009, 05:18 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

And what exactly do you want as a response to this question? Yes, or No?

This is a Pro forum, which requires a bit of a pro attitude from you: ask proper questions, provide details, shows us what you've already done and what you're unsure about. And so forth and so on....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #3 (permalink)  
Old August 26th, 2009, 01:45 AM
Kirti.darji
Guest
 
Posts: n/a
Default

hi

I call Code behind method using jQuery using Static web Method.

in this web method call successfully

but when i bind grid view in this method
give error can not use control in static method

how can we solve problem
  #4 (permalink)  
Old August 26th, 2009, 02:43 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I think it's wise to post the relevant code, error messages and so on. Without that, this is quite difficult to solve....

If you post code, please use the code tags and the "Remove Text Formatting" button on the toolbar of the message editor.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #5 (permalink)  
Old September 1st, 2009, 07:50 AM
Kirti.darji
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Imar View Post
Hi there,

I think it's wise to post the relevant code, error messages and so on. Without that, this is quite difficult to solve....

If you post code, please use the code tags and the "Remove Text Formatting" button on the toolbar of the message editor.

Cheers,

Imar

Thanks

Problem is solve thanks for Support

using pass Webcontrol as parameter in static method

Method-1

private static void Getlist(Gridview Gvlist)
{
datatable Dtlist;
.
.
.
Gvlist.Datasource=Dtlist
Gvlist.Databind()
}

Method-2

Call non static Method in static Method with Class Instance


Code:

private static void getData()
{
TestClass a=new testclass();

a.nonstaticGetdata();

}

Last edited by Kirti.darji; September 1st, 2009 at 07:53 AM..


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static Method Abstraction rodmcleay ASP.NET 3.5 Professionals 10 March 29th, 2009 10:51 PM
XSLT php:function: call objects non static method polarbear Pro PHP 1 June 6th, 2008 05:39 PM
Web User Control to act on interface shared method rodmcleay General .NET 0 June 4th, 2008 11:51 PM
how to achieve static method in an interface? cfouquet C# 3 September 28th, 2004 08:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.