|
Hi All ,
I need to get section wise text in a file.
The is possible format of text.
1.Section 1
1.1. Sub Section
Some Text Here
2.Section 2
Some Text Here
Some Text Here
3.Section 3
Some Text Here
Some Text Here
Some Text Here
I need to get Section Title(ie;Section1,Section 2......) and Text with in Section inorder to save Section Text along with Section Title in Database.
Any help is highly appreciated.
|
|
|
|
|
could any one help me out by giving me the code for downloading file and also for simple e-mail system with some explanations?
|
|
|
|
|
|
Subin Alex wrote: could any one help me out by giving me the code for downloading file and also for simple e-mail system with some explanations?
You haven't got the concept of this site. Read this[^] especially point2 and point9.
|
|
|
|
|
hi to all,
i m creating one application, in which i need to get all the list of domain like workgorup etc. and there list of pc's in LAN.
i m using asp.net1.1
pls give me suggestion if any one have.
Thanx in advance...
am.net
modified on Thursday, January 8, 2009 12:48 AM
|
|
|
|
|
am.net wrote: pls give me suggestion if any one have.
My suggestion - don't make all your text bold
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
You'll probably want to create an LDAP query against your active directory. There are a number of examples online - just bear in mind that your asp.net process will need to have sufficient authorisation to make these queries.
|
|
|
|
|
Hi coders,
I want to display one HTML file contents in my aspx page. I am using for that. what I have written is:
aspx page:
<iframe frameborder="no" id="htmlAboutUs" style="width:100%; height:500px;" runat="server" scrolling="no">
cs file:
htmlAboutUs.Attributes["src"] = Server.MapPath(FolderName + "/styles/About-Us.html");
where FolderName is comming from session.
Its not working but. its showing blank page in result(not even "Page Not Found").
Then I tried another one:
FileStream fs = new FileStream(Server.MapPath(FolderName
+ "/styles/About-Us.html"), FileMode.Open);
byte[] data = new byte[fs.Length];
fs.Read(data, 0, (int)fs.Length);
fs.Close();
string dataString = Encoding.UTF8.GetString(data);
htmlAboutUs.InnerText = dataString;
It is also not working. I have checked that its bringing correct data in dataString but not displaying. mean my file contents are properly read but its not assigned to iframe. Please give some gidence.
Thanks for any help.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
Anand Desai wrote: Its not working but
That is because you are using MapPath to return the Physical path as seen internally on the server. The browser does not have access to that. You must use a URL (http://domain/folder/styles/About-Us.html)
|
|
|
|
|
Colin Angus Mackay wrote: MapPath to return the Physical path as seen internally on the server.
I am using localhost anyways. and i think, on web server also, MapPath should work properly.
Thanks.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
Anand Desai wrote: and i think, on web server also, MapPath should work properly.
No. MapPath will give the physical path to the file. That physical path is not accessible from browser. So you need to render path like www.yourdomain.com/folder/filename.html
|
|
|
|
|
Hello everyone,
I wish to know if there is a way to publish a website created in VS2005 to a windows 2003 server using the remote desktop connection.What I have been trying is ....I have created a website in VS2005 and published it locally on the FileSystem.Now if I manually copy it on the windows server 2003 will it work?Morever,I wish to the proper way to publish a website created in VS2005 on windows 2003 server,provided I can connect to windows 2003 server using remote desktop connection only and I dont have admin rights...Please kindly let me know the proper way to do this!!
vasillis_zayetsav
|
|
|
|
|
vasillis_zayetsav wrote: I have created a website in VS2005 and published it locally on the FileSystem.Now if I manually copy it on the windows server 2003 will it work?
It should do. You may have to change some settings in the web.config to match your new environment. Database connection strings for example, you'll want to turn debugging off, etc.
vasillis_zayetsav wrote: I dont have admin rights
There may be IIS settings that you need to change that require admin rights, if it isn't already set up for you.
vasillis_zayetsav wrote: the proper way to publish a website created in VS2005 on windows 2003 server
Publish the website, copy the PrecompiledWeb folder that was created in the publish operation to the server and put it in the correct place.
|
|
|
|
|
public partial class test : System.Web.UI.Page
{
LiteralControl LCT1, LCT2;
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
if (txtbox.Text != "")
{
}
}
}
private void CreateControl()
{
for (int i = 0; i <= Convert.ToInt32(txtbox.Text) - 1; i++)
{
LCT1 = new LiteralControl();
LCT1.Text = "<br/>";
TextBox txt_box = new TextBox();
txt_box.ID = "txt" + "" + i.ToString();
PH1.Controls.Add(LCT1);
PH1.Controls.Add(txt_box);
//////////////////////
LCT2 = new LiteralControl();
LCT2.Text = "<br/>";
TextBox text_box = new TextBox();
text_box.ID = "txt_" + i.ToString();
PH2.Controls.Add(LCT2);
PH2.Controls.Add(text_box);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
CreateControl();
}
protected void Save_Click(object sender, EventArgs e)
{
//Now here i want to insert value in Database from my textboxes which is created in PH1 and PH2
}
|
|
|
|
|
Heard about viewstate ? ASP.NET will not maintain viewstate for controls created on page_load . Read about ASP.NET page life cycle.
|
|
|
|
|
I need to find the width of the letter which i am using to create image in which it will be there as word.
|
|
|
|
|
Reposting the same question so soon only irritates people.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
on button click only i want the requiredfieldvalidator should fire, how can i do these in asp.net
|
|
|
|
|
Hi I am new in programming. Currently I involved in developing a website for a company. I use microsoft visual studio 2008 to create my website. I wish to add modules to ease my job to track the bug and store the exception in a text pad. As I know for window based application and web application are able to create a module and use in page. Is it possible to do in a website?
i add a class in my App_Code, when i want to call the method in the class, it show the blue line under my text. When i mouse over my text, it show "Reference to a non-shared member requires an object reference."
Need help
|
|
|
|
|
Hi,
i'm just guessing but are you trying to access your code without an instance of the class? If you want to do so, you have to options. Create an instance using the new-keyword or declare all methods in your class static so that you don't need an instance.
Please be so kind to post your code (the underlined one, and the one you are trying to access). This will help us to solve your problem.
Regards
Sebastian
|
|
|
|
|
Hi Sebastian,
Thanks for your help. I had solved my problem, where I forgot to put "shared" in my public sub in the class file.
Public Class Msecurity
Public Shared Sub UpdateEvent(ByVal [text] As String)
Regards,
alyy0406
|
|
|
|
|
I have very typical problem in role based authorization.
i have three roles , role1, role2, role3
and three pages , role1.aspx, role2.aspx, role3.aspx
now any person who is in role1 should not be able to see pages of role2 and role3, if he is not assigned to them. Even if he types in url :http://www.<someaddress>/role2.aspx or role3.aspx
he should be redirected to error page,
how i define this rule in web.config in windows authentication
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
I am trying to pass xml data with its schema from VB.Net to a javascript function (as a parameter) in string format.But i keep having this error 'Unterminated string constant'. Can someone help me how can i pass XMl data as string to javascript funtions from VB.Net please? Thanks
|
|
|
|
|
jonhbt wrote: 'Unterminated string constant'
Which means your string is not ended properly. HTML content will have single quote(' ) symbol and JS will think it as an end of line. So you need to replace single quote(' ) with '' . This is applicable for double quotes (" ) too.
|
|
|
|
|
I dont have any quotes but skipping a line. I am replacing Chr(13) with " " but still is not working
|
|
|
|