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

ASP.NET

 
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 
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 
alright, I finnally got that part working, I really appreciate your help.
Since I don't know nothing about regex I would like to make complementar question:
If I design the html using an editor I will have the whole html structure when I read the file,
I was thinking of how can I parse the , and tags from the html so I could strip their contents and print them out on the correct place on my aspx, it would be so much easier than cutting down the design html parts everytime I change it and to hardcode additional css or js on the header, for example the following design:
------------------------------------------------


<script....!
<link...!
<head="">
<script>....!
<form>
<table...!
...!
<table...!
<form>
<div...!
<body>
------------------------------------------------

if I could just parse those main elements and get the contents inside them (ending with "!") printing those lines my aspx file... do you think it is possible?

an idea (ASPX):
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>template 2</title>
<% loadCustomHtmlHeaderContents() %>
</head>
<body>
<% loadCustomHtmlBodyUpperContents() %>
<form id="form1" runat="server">
<asp:PlaceHolder ID="TemplatePlaceHolder" runat="server"></asp:PlaceHolder>
</form>
<% loadCustomHtmlBodyLowerContents() %>
</body>

the html file <form> tag would just be ignored since I already have one on my aspx file, I would need it just to reference whats between the <body> and <form> and between </form> and </body>.

===Updated===
or even better , if I add a placeholder to each one of those sections (header,upperbody,lowerbody) it would be much easier to add content there, I just would need a regex to know when I am inside a placeholder like this:

@@header@@
@@/header@@

or

@@upperbody@@
@@/upperbody@@

can you help me parsing that?

at last, I intend to use this on a masterpage and I have just one contentplaceholder there, I was able to clone that control adding it to the placeholder and it shows fine the contents from the other pages but the viewstate is lost... I tried to move the contentplace holder but I think that's not possible, the parent property is locked, is that possible? to put the contentplacholder on the place that I want(move)?
I tried:
//
TemplatePlaceHolder.Controls.Add(MasterPageContentPlaceHolder);
//
the contentplaceholder renders fine but if I use a grid for example and select a row I get:

"System.NullReferenceException: Object reference not set to an instance of an object."
when accessing "GridView1.SelectedValue.ToString()"

it looks like the viewstate is gone after the postback, is that it?

thank you so much again Big Grin | :-D



-- modified at 21:25 Sunday 8th October, 2006
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 
QuestionDiff between sqlConnection and oleDbconnection Pin
miniThomas7-Oct-06 21:54
miniThomas7-Oct-06 21:54 
AnswerRe: Diff between sqlConnection and oleDbconnection Pin
Tad McClellan8-Oct-06 3:31
professionalTad McClellan8-Oct-06 3:31 
GeneralRe: Diff between sqlConnection and oleDbconnection Pin
miniThomas8-Oct-06 19:11
miniThomas8-Oct-06 19:11 
Questioncheckbox in datagrid Pin
ptvce7-Oct-06 20:25
ptvce7-Oct-06 20:25 
AnswerRe: checkbox in datagrid Pin
postmaster@programmingknowledge.com8-Oct-06 0:03
postmaster@programmingknowledge.com8-Oct-06 0:03 
GeneralRe: checkbox in datagrid Pin
miniThomas9-Oct-06 23:35
miniThomas9-Oct-06 23:35 

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.