|
Hi Apurva,
Thankyou for your prompt reply.
In my gridview the values are coming from CBValues table & CbNo is ID of that table and foreign key of my master (profitlossdata) table. I am populating my gridview with CBNo and some other template columns. Then I am trying to insert these values into my master table on a button click event as in the sub in my previous post, so these values will exist in master table only if the Insert statement works, and that is my problem, the insert stt is failing... or am I confused?...well it's 3:30pm in Adelaide I guess my brain is off for a nap.
Can you kindly explain it a bit more in detail?
Thanks a million.
Aartee.
...HE is watching Us All!
|
|
|
|
|
The only problem what I can guess is some ID(which you are inserting in the second table as a foreign key) does not belong to the first table(i.e. ID not there in the first table). Can you check them again?
Best Regards,
Apurva Kaushal
|
|
|
|
|
The DRP System use asp.net tech and Sql server 2000
3 level tech architcture.
www.drpsky.com
Good friend
|
|
|
|
|
congratulations...
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi all,
I want to display employee photo whenever he logs in. I am not storing the url of photo in database instead i have created a folder in which the photo is saved with empid name.I want that if the photo doesn`t exist a default pic to be shown.If the photo exists in the folder,the pic be shown. how do i achieve this.
Thankx in advance.
|
|
|
|
|
So what exactly is the problem you are having? What you need to do is to find the reuired image in the folder and if not found display the default image.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi
let us say u have an image object. it has a property imageurl which u can set at runtime. since u r knowing the empid of the user logging in its easy for u to trace the imagename from the source directory. the only thing u have to check whether the image exists r not. try this and see. if it has any prob let me know for further asst.
|
|
|
|
|
Where`s the code???
I just want to check whether the photo exists or not.What happens is i set the URL as IMG1.Src="c:\\"+empid+".jpg" .But if the photo is not present it displays nothing(it`s obvious).What to do???
|
|
|
|
|
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
|
|
|
|