Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Hayrah Burki   on Jun 29 In Asp.net Category.

  
Question Answered By: Danny Perkins   on Jun 29

i got many questions but none of them wasn't the "real" solution.
but...i found the solution my self !
ok.
i add constructor to my class that give me all client  properties from sql
server
(my objects are vb and the pages  that uses them are in c#)


userObject.vb
---------------
public sub new()
me.generateUser()
end sub

public sub generateUser()
'find the uid client cookie and go to sql server and get me all user
properties
end sub

now to the header  control:

userObject userObj = new userObject();
//at this point since i had constructor it gets me all the user properties
private void page_load
{
//bla bla
}

//expose control  property
public string webUrl
{
get
{

return userObj.webUrl;
}

}

now to my page  which host the control:

index.aspx.cs
--------------

protected netTools.header userObj;//header control with user object
properties
private void Page_Load(object sender, System.EventArgs e)
{
//print header property
Response.Write (userObj.webUrl);
}

hopes your case is similar.
for me it's works great since it's exactly what i wanted to do

Share: 

 
 
Didn't find what you were looking for? Find more on sharing data Or get search suggestion and latest updates.


Tagged: