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
Big Pimpin
NA
3
2.4k
Is DS Out Of Scope Or Am I Free To Access From A Method?
Sep 3 2015 9:11 PM
This is my syntax, I want to know if I can access DS from my _SelectedItemIndexChange in a different method in my partial ABCD class?
[code]
namespace Test.Pages
{
public partial class ABCD : Pages
{
public Dataset DS = new DataSet()
public MainClass classE = new MainClass();
protected void itemPick_SelectedIndexChanged(object sender, EventArgs e)
{
DS = classE.PullSQLData();
}
}
}
public class MainClass
{
private DataSet DS = new DataSet();
private StringBuilder SB = new StringBuilder();
public DataSet PullSQLData()
{
string databaseConnection = "";
DS = new DataSet();
SqlQueryBuilder = new StringBuilder();
SqlQueryBuilder.Append("exec dbo.GetSQLData ");
DS = ExecuteSqlQuery(databaseConnection, SqlQueryBuilder.ToString());
return DS;
}
}
[/code]
Reply
Answers (
0
)
How to save rich text box data into sql server 2012.
How can I disable two buttons in all forms bsed on dif login