Click here to Skip to main content
15,911,646 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionImage in DropDownList Pin
oskardiazdeleon8-Oct-06 10:22
oskardiazdeleon8-Oct-06 10:22 
AnswerRe: Image in DropDownList Pin
Mike Ellison8-Oct-06 19:08
Mike Ellison8-Oct-06 19:08 
Questionasp.net Pin
mehrdad_20068-Oct-06 10:03
mehrdad_20068-Oct-06 10:03 
AnswerRe: asp.net Pin
thomas_joyee8-Oct-06 17:51
thomas_joyee8-Oct-06 17:51 
GeneralRe: asp.net Pin
miniThomas8-Oct-06 19:24
miniThomas8-Oct-06 19:24 
GeneralRe: asp.net Pin
thomas_joyee8-Oct-06 20:10
thomas_joyee8-Oct-06 20:10 
GeneralRe: asp.net Pin
miniThomas9-Oct-06 23:52
miniThomas9-Oct-06 23:52 
QuestionHow to Evaluate a string on html to Render a Server Control on the page [modified] Pin
ThePlagueIsBack8-Oct-06 7:14
ThePlagueIsBack8-Oct-06 7:14 
hi there,
I've found many ways of parsing an html file inside an aspx page and they all work good with plain html controls but none of them are able to render a full featured server control.

I was thinking of loading the html file from disk and inserting its contents inside the of my aspx, so far so good but I needed to replace my custom tags on this html file with some function to render the server controls.
---------------------------------------------------------------
SAMPLE HTML:

@@pageheader@@
@@calendar@@ @@main@@
   

---------------------------------------------------------------
ASPX FILE:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="02.aspx.cs" Inherits="_02" %>





<title>template 2



<%
//LOAD HTML FROM FILE;
//SEARCH FOR MY PRE-DEFINED TAGS
//REPLACE THOSE FOUND TAGS WITH PARSEABLE FUNCTIONS
...eg: the @@calendar@@ custom tag would replaced
with a renderCalendar() function that would render a calendar
when parsed by asp.net
%>



---------------------------------------------------------------
CODEBEHIND:
public void renderCalendar()
{
...
this.Controls.add(aNewCalendar);
}
---------------------------------------------------------------
this approach doesnt work and gives me a :
"Collection was modified; enumeration operation may not execute."

Asp.net will process the page and on the place where the custom
Tags were replaced with my functions (like the calendar) it would
Run that function that adds the control to the collection,
But it control should be added at that specified position on the
Html file. The html should be read by asp.net as it was an
Original aspx code in order to be rendered at the correct place;
Is that possible to achieve?

do you guys have any tip for me?
thanks a lot



-- modified at 13:38 Sunday 8th October, 2006
AnswerRe: How to Evaluate a string on html to Render a Server Control on the page Pin
Guffa8-Oct-06 7:52
Guffa8-Oct-06 7:52 
GeneralRe: How to Evaluate a string on html to Render a Server Control on the page Pin
ThePlagueIsBack8-Oct-06 8:01
ThePlagueIsBack8-Oct-06 8:01 
AnswerRe: How to Evaluate a string on html to Render a Server Control on the page Pin
Guffa8-Oct-06 8:15
Guffa8-Oct-06 8:15 
GeneralRe: How to Evaluate a string on html to Render a Server Control on the page Pin
ThePlagueIsBack8-Oct-06 9:00
ThePlagueIsBack8-Oct-06 9:00 
GeneralRe: How to Evaluate a string on html to Render a Server Control on the page Pin
ThePlagueIsBack8-Oct-06 9:04
ThePlagueIsBack8-Oct-06 9:04 
GeneralRe: How to Evaluate a string on html to Render a Server Control on the page [modified] Pin
ThePlagueIsBack8-Oct-06 9:37
ThePlagueIsBack8-Oct-06 9:37 
QuestionActive directory user from asp.net 2.0 Pin
Marp Tech8-Oct-06 6:42
Marp Tech8-Oct-06 6:42 
AnswerRe: Active directory user from asp.net 2.0 Pin
Mike Ellison8-Oct-06 18:59
Mike Ellison8-Oct-06 18:59 
QuestionRe: Active directory user from asp.net 2.0 Pin
Marp Tech8-Oct-06 20:41
Marp Tech8-Oct-06 20:41 
AnswerRe: Active directory user from asp.net 2.0 Pin
Mike Ellison9-Oct-06 6:17
Mike Ellison9-Oct-06 6:17 
QuestionSo how come Windows 2003/SQL Server does not support Active-Active clusters? Pin
devvvy8-Oct-06 4:56
devvvy8-Oct-06 4:56 
QuestionDataGrid Edit,Update,Cancel Column Pin

MmM.net</

8-Oct-06 2:23

MmM.net</

8-Oct-06 2:23 
QuestionGoogle Sitemap Pin
shapper8-Oct-06 2:15
shapper8-Oct-06 2:15 
AnswerRe: Google Sitemap Pin
Mike Ellison8-Oct-06 19:04
Mike Ellison8-Oct-06 19:04 
Questionwebservice query Pin
biaali8-Oct-06 0:39
biaali8-Oct-06 0:39 
AnswerRe: webservice query Pin
Walter_H9-Oct-06 20:22
Walter_H9-Oct-06 20:22 
GeneralRe: webservice query Pin
biaali11-Oct-06 21:08
biaali11-Oct-06 21:08 

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.