Click here to Skip to main content
15,902,840 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: get control id from the content page Pin
srinandan..16-Mar-07 3:50
srinandan..16-Mar-07 3:50 
GeneralRe: get control id from the content page Pin
Sylvester george16-Mar-07 3:59
Sylvester george16-Mar-07 3:59 
GeneralRe: get control id from the content page Pin
srinandan..16-Mar-07 4:03
srinandan..16-Mar-07 4:03 
AnswerRe: get control id from the content page Pin
Jesse Squire16-Mar-07 3:49
Jesse Squire16-Mar-07 3:49 
GeneralRe: get control id from the content page Pin
srinandan..16-Mar-07 3:58
srinandan..16-Mar-07 3:58 
GeneralRe: get control id from the content page Pin
Jesse Squire16-Mar-07 5:37
Jesse Squire16-Mar-07 5:37 
GeneralRe: get control id from the content page Pin
srinandan..18-Mar-07 21:08
srinandan..18-Mar-07 21:08 
QuestionMysterious Web User Controls Related Problem Pin
powered_by_xanax16-Mar-07 2:54
powered_by_xanax16-Mar-07 2:54 
Hi, I’m somehow new to user controls in asp.net plz help me out!
I’ve two major problems with the following code:
protected void Page_Init()
{
for (int i = 0; i < 10; i++)
{
ctrl_new_friend temp_new_friend = (ctrl_new_friend)LoadControl("ctrl_new_friend.ascx");
temp_new_friend.ID = "ctrl_new_friend_" + i;
// >> For Debugging Purposes And Should Be Replaced By Data From DB
temp_new_friend.image_name = "hamed";
//End Debugging <<
ph_new_friends.Controls.Add(temp_new_friend);

Image img_separator = new Image();
img_separator.ImageUrl = "~/anonsec/misc/xuniv_separator_blue.gif";
ph_new_friends.Controls.Add(img_separator);
}
}
First: It works fine but sometimes – mysteriously - get an “Unable to cast” error;
Second: It doesn’t seem to be performance friendly, and if I put the LoadControl() outside of the for() block it adds the control just one time.
I think I’m making a mistake using such coding!
Thanks for your help.

QuestionHow to transfer data from HTML table to excel or through dataset to excel. Pin
AjayKrSh16-Mar-07 2:53
AjayKrSh16-Mar-07 2:53 
AnswerRe: How to transfer data from HTML table to excel or through dataset to excel. Pin
Jesse Squire16-Mar-07 3:27
Jesse Squire16-Mar-07 3:27 
GeneralRe: How to transfer data from HTML table to excel or through dataset to excel. Pin
AjayKrSh16-Mar-07 3:48
AjayKrSh16-Mar-07 3:48 
GeneralRe: How to transfer data from HTML table to excel or through dataset to excel. Pin
Jesse Squire16-Mar-07 3:54
Jesse Squire16-Mar-07 3:54 
Questionlistbox and arrays Pin
Kunal P16-Mar-07 2:47
Kunal P16-Mar-07 2:47 
Questionbrowser's back button Pin
yogita charhate16-Mar-07 2:27
yogita charhate16-Mar-07 2:27 
AnswerRe: browser's back button Pin
Kunal P16-Mar-07 2:40
Kunal P16-Mar-07 2:40 
GeneralRe: browser's back button Pin
yuvachandra16-Mar-07 2:48
yuvachandra16-Mar-07 2:48 
GeneralRe: browser's back button Pin
Kunal P16-Mar-07 4:45
Kunal P16-Mar-07 4:45 
GeneralRe: browser's back button Pin
yogita charhate16-Mar-07 4:13
yogita charhate16-Mar-07 4:13 
GeneralRe: browser's back button Pin
Kunal P16-Mar-07 4:48
Kunal P16-Mar-07 4:48 
QuestionSetting _DEBUG for web project Pin
Leo Smith16-Mar-07 2:26
Leo Smith16-Mar-07 2:26 
AnswerRe: Setting _DEBUG for web project Pin
Jesse Squire16-Mar-07 2:56
Jesse Squire16-Mar-07 2:56 
GeneralRe: Setting _DEBUG for web project Pin
Leo Smith16-Mar-07 4:16
Leo Smith16-Mar-07 4:16 
QuestionServer Error Pin
vijay_8316-Mar-07 2:22
vijay_8316-Mar-07 2:22 
AnswerRe: Server Error Pin
ca8msm16-Mar-07 2:30
ca8msm16-Mar-07 2:30 
AnswerRe: Server Error Pin
coolestCoder16-Mar-07 2:32
coolestCoder16-Mar-07 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.