|
What folders are excluded that you think should be included?
---
b { font-weight: normal; }
|
|
|
|
|
I made a typo when I said that there is folders that are excluded, but it's not.
There is no directory named vti_pvt and _vti_text it should be _vti_pvt and _vti_txt .
Small typeo's, but makes a hell of a project .
I did a detailed debug nd saw this irregularity.
I did listen to Ironfoot and move GetExcludedFolder() out of the foreach.
But I didn't do as Ironafoot said with two for's becouse it would be hard to create an array from one string that is read from Xml.
Replaced array with ArrayList becouse I need dynamic array and now code, that works, looks like this:
protected override void Render(HtmlTextWriter writer)
{
string tmp = GetExcludeFolder();
int i = 0;
DirectoryInfo dir = new DirectoryInfo(GetWwwRootFolder());
DirectoryInfo[] d = dir.GetDirectories("*");
foreach (DirectoryInfo s in d)
{
if (tmp.IndexOf(s.Name) == -1)
{
directory.Add(s.Name.ToString());
date.Add(s.CreationTime.ToString());
i++;
}
}
Response.Write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">");
Response.Write("<tr>");
Response.Write("<td style=\"height: 25px; width: 50%;\">Folder name");
Response.Write("</td>");
Response.Write("<td style=\"height: 25px; width: 50%;\">Date created");
Response.Write("</td>");
Response.Write("</tr>");
for (i = currentPage * pageSize - pageSize + 1; i <= currentPage * pageSize; i++ )
{
if (i >= directory.Count)
break;
Response.Write("<tr>");
Response.Write("<td style=\"height: 25px;\"><a href=\"http://localhost/" + directory[i - 1] + "/\">" + directory[i - 1]);
Response.Write("</a></td>");
Response.Write("<td style=\"height: 25px;\">" + date[i - 1]);
Response.Write("</td>");
Response.Write("</tr>");
}
Response.Write("<tr>");
Response.Write("<td style=\"height: 25px\" colspan=\"2\"><div align=\"" + GetPagingAlign() + "\" id=\"CustomPageAlign\">");
Response.Write("Choose page: ");
int mat = (int)Math.Ceiling((decimal)directory.Count / pageSize);
for (i = 1; i <= mat; i++)
{
if (i == currentPage)
{
Response.Write(i + " | ");
}
else
{
Response.Write("<a href=\"Default.aspx?Page=" + i + "\">" + i + "</a> | ");
}
}
Response.Write("</div></td>");
Response.Write("</tr>");
Response.Write("</table>");
}
It always helps me to see a bug if I talk to someone (forums, mails, etc.). I get a good code's that I can use and with talking, I can see some bugs that I could never see if I wasn't wrote this thread and ask you.
Thank you both for your time. I appreciated.
|
|
|
|
|
How do i upload images on to specified web pages?
thank you
Nothing lasts but nothing is lost
|
|
|
|
|
|
|
Hi
I have 2 chekboxes and a submit button in asp.net 2.0
on first checkbox onclick event i wrote a javascript , that will check the other checkbox to true and disable it.
now when i submit the page , before submmiting the page i get the other check box as checked = false; but acctually i have done it checked= true; using javasccript
please help why this is happening as i need to the other checkbox as checked = true using javascript
deepak
|
|
|
|
|
If you disable a form field it won't be included in the data that is sent from the form.
---
b { font-weight: normal; }
|
|
|
|
|
i have installed IIS on my Windows XP normally.its working for
http://localhost/ but when i give a site like
http://localhost/paksite/Test.aspx
(its a test page i developed myself.name is obviously Test.aspx)
it give me back HTML and asp.net code as well. as u all know that server should not return asp.net code. it should only return html and html equivalent of asp.net code
|
|
|
|
|
Normally, the IIS needs installing before the .NET framework, otherwise it does not work properly. Also, when the ASP.NET is not properly set up, it may also cause the iissue, and in this case you can use the Aspnet_regiis.exe tool to reset the ASP.NET.
|
|
|
|
|
Hi guys
How you do add a report (rdl file) in a report viewer in asp.net 2.0?
|
|
|
|
|
Hi
I am using a label and a html select control in asp.net 2.0 , and writing a javascript to set the value of the selected index of select control in the label,
but i am getting nothing please help me
here is a small code i am using
function setForFrozen(isFrozen)
{
if(isFrozen == 'true' )
{
var selectedItem = document.getElementById("permddlCity").selectedIndex;
var selectedText = document.getElementById("permddlCity").options[selectedItem].text;
document.getElementById("ctl00_MainContent_ctl00_lblPermOtherCity").value = selectedText;
document.getElementById("ctl00_MainContent_ctl00_lblPermOtherCity").style.display ="block";
}
}
deepak
|
|
|
|
|
And what is happening when you try this? Is selectedText valid? Is the an error being generated? Are you just not getting the text to show up on the label?
We need a little more than "i am getting nothing"
only two letters away from being an asset
|
|
|
|
|
Hi Mark,
thanks for the efforts but i got the solution
I have to use innerHtml to get the text in DIV tag
as for the Label control .net renders is a DIV tag
stay blessed'
deepak
|
|
|
|
|
i wanna add a custom control to a webform in ASP.NET 1.1, and i've two problems:
(Hint: the custom control has some javascript code that i wrote in the same file *.ascx with the controls in this custom control)
1- when i add my custom control more than once in the webform, the javascript don't work att all,..(it's a rollover behavior)
2-i need to put a hidden field in this custom control that have a value which is ,set by the javascript code, AND accessed by the webform that have this custom control on it....
i know this sounds complicated, but i've no other choise
(hint: does anyone know any other way(s) to build the rating control (the filled stars) just like the one in yahoo video, to make a survey form, and with no postbacks)
thnx for ur help
Kariem
|
|
|
|
|
Create a composite control , in that use javascript something like this
if (MaxLength > 0 && TextMode == TextBoxMode.MultiLine)
{
// Add javascript handlers for paste and keypress
Attributes.Add("onkeypress", "doKeypress(this);");
Attributes.Add("onbeforepaste", "doBeforePaste(this);");
Attributes.Add("onpaste", "doPaste(this);");
// Add attribute for access of maxlength property on client-side
Attributes.Add("maxLength", this.MaxLength.ToString());
// Register client side include - only once per page
if (!Page.ClientScript.IsClientScriptIncludeRegistered("TextArea"))
{
Page.ClientScript.RegisterClientScriptInclude("TextArea", ResolveClientUrl("~/FSjavaScript/textArea.js"));
}
}
then u can use the control as many times u feel like , the scripts will not roll up
|
|
|
|
|
Hello.
I want to add a Control to my Page through the code-behind, and AFTER that, use the Response.Write cmd.
eg.:
Page.Controls.Add(Page.LoadControl("Top.Ascx"));
Response.Write("after");
Will this load the Control, and after the Control is loaded, it will write "after" or just the oposite?
If it is oposite, how can I fix it?
Thanks alot.
NaNg.
|
|
|
|
|
It will first add the control to the control collection of the page object, then it will write the text to the output stream. As the controls of the page is rendered to the output stream after the Page_Load (and Page_PreRender), the text will end up before the entire page, even before the <htlm> tag.
If you want to put text on the page, put it in a control, either one that you put on the page in advance, or one that you add to the page. A Literal control is suitable to put plain text on a page.
---
b { font-weight: normal; }
|
|
|
|
|
I wanna use the asp.net 2.0 menu control .
i am binding it to an xml file, then it always shows my menu items with one root(caz each xml file must have one root element).
how can i eliminate the root from my menu items?????
|
|
|
|
|
I'm sure this falls into the category of "question that has been answered that can't be found by a search". I have inherited a website written in ASP (not ASP.NET). I now want to integrate new pages into the site but I only program in ASP.NET. Am I going to have problems running an ASP.NET application (with all its associates web.config / global.asax etc etc files) from the same server directory that the ASP application is currently sitting in?
I have seen utilities that automatically convert ASP into ASP.NET but I'm pretty sure that that is likely to go wrong and I don't have the time to correct the errors. Does anyone have experience of doing this conversion? How pain free is it?
Thanks in advance,
Matt
|
|
|
|
|
You can use both ASP.NET and ASP pages in the same site. IIS will handle invoking the proper httpmodules to process the request.
only two letters away from being an asset
|
|
|
|
|
i have site connect to database system
and users register in my site
and i want know the current users inspecific catgory
and total number of users
Eng.developer
|
|
|
|
|
just count the no of users from database
Mahendra
|
|
|
|
|
When the user goes throught the login page, you must to create a two session values with the user_ID and category, later create a consultation page, this page count all the user_id session values actives.
keep Learning...
|
|
|
|
|
hi
I have a html selected control
and i want the selected text from javascript
the control is like this
hi
I want this "hi" from javascript
deepak
|
|
|
|
|
getElementById("s").options(0)
only two letters away from being an asset
|
|
|
|