|
Ohh... I see.
santoshkumarB, u should use CMS. Have U ever heard about CMS? This CMS will solve your problems.
Regard,
Edwin
|
|
|
|
|
Thank you sir,
no i havn't heard abt CMS. Can u tell me wat is tis CMS
But can we use xml,xslt to solve this problem....
santosh
|
|
|
|
|
CMS (Content Management System). In ASP.NET 2.0 U will find it in ToolBox Web Part.
Or other way U can Save every user settings in database.
But I suggest U to use web parts. U can find it at msdn how to use it.
Of course U can use xml.
Regard,
Edwin
|
|
|
|
|
Something like a content management system ? You can open existing ASPX files using filestream and write it to the disk with other name. Put some special tags where your content need to be replaced. Replace this special tags with your content when page is creating.
But keep it in mind that this will work if you are using ASP.NET 2.0, in ASP.NET 1.1, code behind data will be wrapped in dll's. So creating a simple aspx file won't do work.
Alternative approach would be using UrlRewriting . In this case, you won't be having files, all the URL's you are seeing will be virtual.
|
|
|
|
|
Data for content management like this is usually persisted in some data storage mechanism, like a database or xml file. The file/data describes the page and content, and then a generic pages is used to read this data and build the page on teh fly. Look at iGoogle. Each page for each user is different. But Google don't create a new page for each user, they store the users layout in a DB.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Thank you,,
Will xml and xslt sove this problem .....
santosh
|
|
|
|
|
Yes. Store the data in Xml, apply an xlst translation to it and, as if by magic, you have a web page.
You need to work on the xml layout to ensure the page is described well. It is not a 30 minute job either, but certainly better than writing a HTML code generator, which is what you would need to do for your original idea.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Be aware of exposing dynamic WebForms to user. Unless you have enough NTFS permissions in place, you are opening up the Pandorra's box on your server.
|
|
|
|
|
Hi all,
I have a textarea. I populate the textarea with data from the database and load it into the textarea using <%=stringVariable %>, then the user can change the text and then save it back to the database, but when I try to get the value for the textarea I get the following error:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
One suggestion I have found is to use <%#stringVariable %> instead, but then it doesn't display the text in the textarea.
Does anyone have any suggestions or solutions to solve this problem?
Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
Is your textarea a server control ? If yes no need of doing this. Directly in code behind file you can assign value to it.
|
|
|
|
|
This is what I have in the content page
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="editor.aspx.cs" Inherits="htmlarea_editor" Title="Untitled Page" ValidateRequest="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:LoginView runat="server" ID="loginView1">
<LoggedInTemplate>
<textarea runat="server" id="editorArea" name="htmlEditorArea" rows="40" cols="60">
</textarea>
<asp:Button runat="server" ID="btnSave" Text="Save Changes" OnClick="btnSave_Click" />
<asp:Button runat="server" ID="btnCancel" Text="Cancel Changes" PostBackUrl="~/index.aspx" />
<script type="text/javascript" language="javascript1.2">
var config = new Object();
config.bodyStyle = "background-color:black;color:white";
editor_generate('<%=textAreaName %>',config);
</script>
</LoggedInTemplate>
</asp:LoginView>
</asp:Content>
But in the codebehind I can't access the textarea, when I try to use
editorArea.Value
it doesn't find the control.
I also tried using
((HtmlTextArea)FindControl("editorArea")).Value
But then I get the message that I have to use the new keyword
Any suggestions?
Thanks
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
How you added the textarea ? From tool box. Here I am not seeing any need of using HTML text area and making it runat server. Instead of this, you can use asp textbox and set multiline true, and you will be able access this from code behind
|
|
|
|
|
The thing is I need to use a textarea, the script underneath the textarea is a WYSIWYG editor, and it uses the textarea and the textarea name to change that into the editor, otherwise I would have used a textbox.
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
Hi, thanks for all your help, I think I have found a solution see my last post at the bottom of the thread, once again many thanks
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
If u use SqlDataReader, then u can type this code :
<%
<small>This is just example</small>
SqlDataReader reader = cmd.ExecuteReader();
reader.Read();
string text = reader["YourColumn"].ToString();
%>
<textarea id="YourTextArea" cols="20" rows="2" runat="server"><% Response.Write(text); %></textarea>
Hope this will help U
-- modified at 5:04 Monday 6th August, 2007
Regard,
Edwin
|
|
|
|
|
We went over and over this in an earlier post. The line
editor_generate('<%=textAreaName %>',config); is giving you the problems as it takes the textarea and renders something totally different, removing the RunAt='server'.
You really need to re-engineer the WysiWyg javascript file - I even gave you the line you had to change to resolve this.
Here is the original post Original Post[^]
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Yes we did, but I just got a solution, I keep the textarea without the runat, change the script and hardcode the name of the textarea because when it is a html control the name does not get changed as with the runat. Then to get the new value of the textarea I just postback the same page and then in the page load check for a page.postback and if true I do a request.form on the name of the textarea and then I get the new value of the textarea without any errors, I can then save that back into the database.
Plus point being no re-enginering of the editor needed.
Thanks for all your help and trouble, I finally have a solution.
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
cool - glad you got it sorted.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Dear Members,
presently im working on dotnet (asp.net,vb.net,crystal report). almost 2 year exp. i registered in many websites but i am not getting the calls.please give some guidence regarding resume writin..please send any resume samples to my email Id
rashmi.saniya@yahoo.co.in
Thanks
|
|
|
|
|
Rashmi,
You can take help of a few resume writing articles in job sites. That should help you. It just needs to your diligent and focussed attention in job preparations.
|
|
|
|
|
This is not the right place to ask.....
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Hai I am doing my project in asp.net/c# and Firebird as database.
I have a description field. When I read the content of the description, it is coming like this
"e some character & quote. How can I change it like this "some character".
|
|
|
|
|
A kamath wrote: "e some character & quote
Description = Description.Replace(""e","\"");
|
|
|
|
|
|
hi friends
1.what is sticky session and use of this
2.what is secured socket layer
3.what is load balancing
can u tell me the answer
regards
saravanan
|
|
|
|