|
Hey.
Use d.Name. it returns directory name only
label1.Text +=d.Name;
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thanks u imran for ur reply:
Thank u,
Its not problem in that...,
Its problem in that given path...,
Actually i given the path of teh directory like this:
string _path = "C:\\Inetpub\\wwwroot\\TimeSheet Email Shedular\\Email Send";
DirectoryInfo dInfo = new DirectoryInfo(_path +"\\");
In that time its give probs:
So i directly given the path in that directory:
DirectoryInfo dInfo = new DirectoryInfo("C:\\Inetpub\\wwwroot\\TimeSheet Email Shedular\\Email Send\\");// (Server.MapPath("SendEmailFolder"));
Now its working
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Problem statement :
I have a project which has 3 separate websites,which lies under the same domain name say http://www.xyz.com.
1-I need to design a single signon mechanism which will authenticate the user during the first time itself.
2-if a user types say http://abc.xyz.com, after authentication should directly go to http://abc.xyz.com.(Ex : mail.google goes directly to gmail)
|
|
|
|
|
Hi guys yesterday i posted...,
I want to attach multiple files and have to send emails to different different "To Address"...,
Some guys replied for that sending email is easy go through google...,
Ya i too know there is lot of articles are there to send email...,
My problem is totally diffrent...,Its not problem in sending email...,
Its problem in i want to put the directory name in "To Address"...,
And its contained files have to be attachments of that To address...,
Like this all the folders have to come
finally it have to send...,
Its the problem
Eg:
If i have 3 folders Like:
new@yahoo.com, man@rediff.com, mick@gmail.com
Each folder having multiple files...,
Now the folder name have to come as to address:
Example new@yahoo.com and its contained filders have to send that mailid...,
man@rediff.com and its contained folders have to send this mailid
Like this mick also...,
This alll the things ahev to send at a time
Give me some ideas abt this...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Ok
Suppose you have a directory named 'MailsToSend'.
This sub directory contains folders like " new@yahoo.com, man@rediff.com, mick@gmail.com ".
Using following code you can read the directories.
<br />
Dim MyDir As DirectoryInfo = New DirectoryInfo("C:\MailsToSend")<br />
Dim SubDirs() As DirectoryInfo = myDir.GetDirectories()<br />
<br />
For count As Integer = 0 To Mydirs.Length - 1<br />
Response.Write(Mydirs(count).Name)'contains email address<br />
Dim fileInfos() As FileInfo=Mydirs(count).GetFiles()<br />
for fileCount as Integer = 0 To fileInfos.Length - 1<br />
Response.Write(fileInfos(fileCount).FullName)'Contains file to attach<br />
Next<br />
Next<br />
Hope this helps you
|
|
|
|
|
Hi sherin thanks for ur reply
I given like this eventhough i am not getting the directory name only...,
instead of that its giving total path of the directory:
DirectoryInfo dInfo = new DirectoryInfo(_path + "//");// (Server.MapPath("SendEmailFolder"));
DirectoryInfo[] dInfos = dInfo.GetDirectories();
foreach (DirectoryInfo d in dInfos)
{
label1.Text += Path.GetDirectoryName(d.FullName);
FileInfo[] fInfos = d.GetFiles();
foreach (FileInfo f in fInfos)
{
label2.Text += f.FullName;
}
}
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
New one wrote: label1.Text += Path.GetDirectoryName(d.FullName);
d.Name
|
|
|
|
|
Thank u,
Its not problem in that...,
Its problem in that given path...,
Actually i given the path of teh directory like this:
string _path = "C:\\Inetpub\\wwwroot\\TimeSheet Email Shedular\\Email Send";
DirectoryInfo dInfo = new DirectoryInfo(_path +"\\");
In that time its give probs:
So i directly given the path in that directory:
DirectoryInfo dInfo = new DirectoryInfo("C:\\Inetpub\\wwwroot\\TimeSheet Email Shedular\\Email Send\\");// (Server.MapPath("SendEmailFolder"));
Now its working
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
currently i m using asp.net with c# (.net 2005, 2.0 framework)
i need to fetch the username (User Login ID, which is used when the user enter the OS) of the client machine.
how to achieve it?
Thanks in advance
|
|
|
|
|
You may use following code snippet:
String userName;
userName=System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
Response.Write(userName);
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
thats amazing sam xavier.... no words to express.. thanks a lot man!
|
|
|
|
|
Hi,
I am developing a website and its located at
http:
in my code i have a path
string flv = "~/flashplayer/player.swf";
How to get the full url Path from this code.
like:
http://localhost/MyWebsite/flashplayer/player.swf
Thnaks in Advance
|
|
|
|
|
if it is im the code-behind,
Server.MapPath()
Apurv
|
|
|
|
|
apr ~ asp wrote: Server.MapPath() Return the physical path
|
|
|
|
|
You may use HTTPContext Current Request object to get the desired path:
string Path = HttpContext.Current.Request.MapPath(appPath);
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Not physical Path .. I need the web path
|
|
|
|
|
Hi
using asp.net 2.0, i wanted to display some text in Hyperlink mouseover event.
any body plz tell me how to do?
thanks
Ramana
|
|
|
|
|
Ok.Take one div and write some text and make this div visible true or false on MouseOver and MouseOut event of Hyperlink.
For Example
<asp:HyperLink ID="myLink" runat="Server" onmouseover="display(0);" onmouseout="display(1);" >Sample</asp:HyperLink>
<div ID="myDiv" style="display:none;">
This is Sample text.
</div>
Your Javascript function
function display(i)
{
if(i==0)
document.getElementById('myDiv').style.display='block';
else
document.getElementById('myDiv').style.display='none';
}
please don't forget to vote on the post that helped you.
|
|
|
|
|
i used gridview to display data from a database
first i placed a panel and given both scrollbars=both i.e horizontal and vertical
than i placed a grid view on the panel
oke its working fine
but the problem is when i scroll vertically
the gridview headings also scrolling
i want to make the headings i.e column fielda as static
so that when i scroll,rows should be scrolled and the headings should be always visible
note: i didnt give any settings for gridview
just i drag and dropped the gridview and filled the data thru runtime
plz help me
thanks in advance
vijay
|
|
|
|
|
You need to add your panel control in ItemTemplate so header will be fixed and ItemTemplate will be scrollable.
For Example
<columns>
<asp:templatefield>
<headertemplate>
<!-- Header Template Design Here -->
</headertemplate>
<itemtemplate>
<asp:panel id="pnl" runat="server" style="overflow:scroll; width:200px; height:200px;">
<!-- Item Template Design Here -->
</asp:panel>
</itemtemplate>
</asp:templatefield>
</columns>
Regards
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Try this
create following css classes
.gridContainer {overflow:auto;}
.gridContainer table th {position:relative;}
.gridContainer table tbody {overflow-x:hidden;}
put your grid inside the following div
<div class="gridContainer" style="height:500px; width:600px; overflow:auto;">
</div>
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
|
Can you please provide the complete text of the error/exception being raised?
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
How can I access an asx file from a different domain? I have a Silverlight MediaPlayer (it comes with SilverLight tools. I use Silverlight 2.2 beta). The Silverlight is hosted in an ASP page. Normally if you supply in mediasource the file name (for example movie.wmv) it plays the file.
modified on Tuesday, July 22, 2008 11:47 PM
|
|
|
|
|
I have an account at webhost4life.com.
I created a .NET2 application in a subdirectory of my main application (could that be the problem?)(I could see it in the .NET application list)
Anyway when I try to access my web application:
http://www.galador.net/blog/
it found an error in http://www.galador.net/web.config ...
how come?
it looks like it is trying to access the app in the parent dir.. (and the problem is this app is using some DLL which are issing in the blog dir by the way).
Any tip about what might be the confusion?
[EDIT]: Thanks to Webhost4life support it is fixed now.
They added the following arcane lines to the Web.config of the root web application:
<location path="." inheritInChildApplications="false"><br />
</location>
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
modified on Wednesday, July 23, 2008 1:25 AM
|
|
|
|