|
Prior to set the src to the image you need to search for the image. This you can do with simple file handling objects.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Sorry,but i have no knowledge of handling files. Can u give me the code ..
Please..
|
|
|
|
|
You can use System.IO.File.Exists("path") to check whether file exists or not.
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
Always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi
iam sorry. i didnot know that u wanted the code.anyways did u get it r not.
|
|
|
|
|
i have pasted a sample code.
here label1.text stands for ur empid
iam using a image server control
i created a folder in the app path named photo where i stored my sample pics
this is how i accessed and set the object. i hope u can modify further acc to ur reqts.
Dim s As String = CurDir()
Dim s1 As String = s & "\Photo"
Dim s2() As String
Dim s3 As String
Dim i As Integer
Dim j As Integer
Label1.Text = "yasoda2"
If Directory.Exists(s1) Then
s2 = Directory.GetFiles(s1)
For i = 0 To s2.Length() - 1
j = s2(i).IndexOf(".")
s3 = Left(s2(i), j)
If (s3 = s1 & "\" & Label1.Text) Then
Image1.ImageUrl = s2(i).Replace(s, "~")
End If
Next
Else
Console.Write("Directory dose not exist")
End If
|
|
|
|
|
hi all,
i have 2simple doubts
1.first one is about Directories in ASP.NET. what are Directories available with ASP.NET??
if i am not wrong are they virtual directories and active directories?? some one asked me today, i am not sure about the answer. i tried to google but not found helpfull info.
2.please can anyone tell me what is (VS.71) here in the Url?? i mean is it a quesry string which is passing to server?? recently i took one assessment test, in that i got similar type of question. they gave me 4 choices but unfortunately i didn't remember them. now when i googling something about directories then i saw the url in the address bar, so want to clarify my doubt.
http://msdn2.microsoft.com/en-us/library/aa719551(VS.71).aspx
thanks,
Rahi
-- modified at 18:35 Wednesday 7th February, 2007
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
You have doubts or questions?
1) active directory has nothing to do with ASP.NET. If you searched google for the term you would have found that information.
2) It is probably a url that is generated dynamically from a virtual path or url rewrite mechanism.
only two letters away from being an asset
|
|
|
|
|
hi Mark,
u r correct. these are not doubts. these are questions. i tried goolge using "ASP.NET directories" but unable to found the exact info. i found how to ceate a directory, ... but not exact info what i am looking for. if some one asks us about ASP.Net Directories...what we should answer?? i mean why we use and how we use that's it?? but they were asking me types of directories....
thanks for the Response,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Rahithi wrote: what we should answer??
Ask them to clarify the question.
Sounds like an interview question that you failed.
only two letters away from being an asset
|
|
|
|
|
nope! it's not an interview question. u guessed wrong!
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hi friends
how to send the sms through wepapplication in asp.net
regards
saravanan
|
|
|
|
|
this[^] will help you.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
i need a way to keep a thread alive, after the client has got the final Response.
The actual problem is, that a webpage on my server is being called by a "far-away" client (service), and this client will timeout in, say 2 minutes. The problem is, I need to download some 12 pictures without the service to timeout, and this takes more than 2 minutes. So I need to run some kind of an background task, and give the client the go signal "DATA OK", so the client thinks that the process is finish.
I have tried some technics, like the normal threading:
Thread t = new Thread(new ThreadStart(DoWork));<br />
t.Start();
But this thread seems to be disposed/killed when the client gets the last response.
So I tried this:
ThreadPool.QueueUserWorkItem(new WaitCallback (DoWork),obj);<br />
This works far better than a normal Thread, as it lives a bit longer than the other model, but it is also killed, before all work is done.
Please say that one of you programmingfreaks ( ) ) have a solution for my problem.
Best regards
Gunnar Hansen
|
|
|
|
|
Hi Friends...
How can Encrypt the asp.net2.0 code?
Is there any encrypting tool?
Thanks all
...
Nour Abdel- Salam
|
|
|
|
|
Perhaps you could clarify what it is you want to do. Encrypt the code-behind, the markup, what?
If you precompile your app everything is placed into assemblies and the aspx portion are just placeholders.
only two letters away from being an asset
|
|
|
|
|
hi friend
I want to encrypt the .vb and the .aspx code
regards
|
|
|
|
|
VB is already encrypted, at least unintelligible
You can use obfuscation for the code behind and as I mentioned compiling your app cause placeholder aspx pages.
only two letters away from being an asset
|
|
|
|
|
Hi everybody
I have two listboxes.
I have set the selectmode to multiple
but when i select multiple items from listbox1, and then clcik ADD button, only one item is getting added
How can i add all the selected items at a time
I am using
Protected Sub btnAdd_ServerClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.ServerClick
Dim licCollection As ListItemCollection
licCollection = New ListItemCollection()
Dim intCount As Integer
For intCount = 0 To lstAllAccounts.Items.Count - 1 Step intCount + 1
If (lstAllAccounts.Items(intCount).Selected = True) Then
licCollection.Add(lstAllAccounts.Items(intCount))
End If
Next
Dim intCount1 As Integer
For intCount1 = 0 To licCollection.Count - 1 Step intCount + 1
lstAllAccounts.Items.Remove(licCollection(intCount1))
lstAccountAccess.Items.Add(licCollection(intCount1))
Next
End Sub
thanks
|
|
|
|
|
remove the part 'Step intCount + 1 in the second loop. it will work
|
|
|
|
|
I'm using Visual Studio.Net 2003, Asp.Net1.1.
I have a datalist bound from a database and loaded with some Names.
I want to fire an "onClick" event when I select an element from the datalist.
How can I do that from the HTML code.
|
|
|
|
|
Reposting it without the URGENT, that may help.
only two letters away from being an asset
|
|
|
|
|
yeah, smart, huh
|
|
|
|
|
Create a control in your datalist template with the onclick client event and use databinding expression to assign the value that is displayed and/or passed to the event.
only two letters away from being an asset
|
|
|
|