|
I am using ms access.
I wud like to upload images inside a folder and the path of that shuld get saved in the database. Moreover i want to bing this database with a datagrid and shud display all images from the databse .
when i tried to bind it shows the path of a image . how to show images other than showing the path on the gridview?
|
|
|
|
|
save the relative path of the image in the database.
Put an image control in item template of gridview. bind the image control with the relative path of the images and the image will show.
Regards,
Kapil Thakur
(Where's there is Kapil , there is a way) - thakur.kapil@gmail.com
|
|
|
|
|
|
Display Images in GridView.[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Dear All,
I used Ms access as a database and the table contains 3 columns as Id, Name and email. I set the Id as a autonumber as well as the primary key.
my problem is, how to add code in asp.net form to make the Id get added automatically in database. My program works well if i give unique value to id but i don't want to show id on the form. cud anyone help me?
also i tried in another way --- designed a query in database and sorted the id column in descending order. In asp.net i took the query's first record's id and add by one. set it as a new value. it works but the problem is, for ex: if the last record's id is 4 and when i add by one 1, I get the new id as 41 instead of 5. cud u help me to sort out this problem?
|
|
|
|
|
First of all you have to find the max id from the table,if it is blank then store in a variable 1 and insert into table and if it is not blank then add to the result +1 and then insert into table.
|
|
|
|
|
Pratheepa wrote: cud u help me to sort out this problem?
Your basic issue, apart from not being able to spell, is that you appear to be adding to the number as a string. If you convert it to a number, you can add 1 to it. Not sure if that is the best option. Most people have databases with ids, which they store with their data, but don't show to the user.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
is it possible to display the records in a grid view with the help of writing the codes in the aspx.cs page if yes
kindly give some links where i can refer to
the reason is because its not showing the records that i want so i want it to be displayed so i thought of writing the query in .cs page and display manually without the use of datasource.
modified on Saturday, June 6, 2009 1:59 AM
|
|
|
|
|
Which control are you using to display data?
Do you mean showing help in tooltip on each record?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
|
thanks for the link
i am studying
i could not open the project as i have to install vs2005 in my system i will check that as soon as possible
once again thanks for the link
it is so usefull for a fresher like me
|
|
|
|
|
Mathew P V wrote: the reason is because its not showing the records that i want so i want it to be displayed so i thought of writing the query in .cs page and display manually without the use of datasource.
WEll, perhaps you need to post your code, so we can see what you're doing wrong. If you're binding to a datasource, then the records will show, so long as your control itself is visible.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
i have not started writing code for grid view i did was using the datasource for retreiving values the sql query is as follows
SELECT DISTINCT LeaveMaster.LeaveType, LeaveAllotted.NoOfDays
FROM LeaveMaster INNER JOIN
LeaveAllotted ON LeaveMaster.LeaveTypeID = LeaveAllotted.LeaveTypeID INNER JOIN
EmpCategType ON LeaveAllotted.EmpCategID = EmpCategType.EmpCategID INNER JOIN
GeneralInfo ON EmpCategType.EmpCategID = GeneralInfo.EmpCategID INNER JOIN
GenderMaster ON LeaveAllotted.GenderID = GenderMaster.GenderID AND GeneralInfo.GenderID = GenderMaster.GenderID
the problem because there are both male and females staffs in my GeneralInfo table its showing both leaves for both the employees infact it should should male leave to males and female leaves to female
|
|
|
|
|
OK, so your SQL needs fixing ? Your problem has nothing to do with the gridview then ?
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
kindly tell me how to display the records in a gridview by writing code in the .cs page
or send me a link which have the description related to this
a reply from you will be deeply appreciated
|
|
|
|
|
Take a look this example.[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Do you not own any references on ASP.NET ? Does google not work where you live ? EIther you're not explaining this right ( possible, as the only code you've posted is SQL ), or you're struggling with something quite trivial.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hello,
I want to call a java web service from my asp.net application?
I have a WSDL file URL for a java web service.
Can anyone tell how can i use the web methods of java web service using a WSDL URL in my asp.net application?
|
|
|
|
|
|
You have given good solution, but i can not add the reference of a web reference in my C# page.
where you have write "using JSimpCalcWebServiceService;", i can't get my added web reference at this position.
so, anything required for this?
|
|
|
|
|
ashish bhakhar wrote: but i can not add the reference of a web reference in my C# page.
Why?
In your Web Site, Right Click on the Project > Add Web Reference > Then one popup window will come. you have to give the WSDL link on that Address bar. Now Click on the Go link.
It will Create a proxy of that web service url.
After successuly creation, you will get the reference name in the below text box, you can change the Reference name.
Suppose you have given the reference name as MyWS. Then Click on Add Reference Button.
Then Add the namespace using MyWS;
Now you can create object of the class of Web service and can call the methods.
Let me know if any other issue.
Hope this will help you.
Thanks you.
|
|
|
|
|
I have done, all you have written.
but after adding a web reference with some name, i can't add the namespace using my given name, bcoz it can't found!
|
|
|
|
|
did you tried access via code, like say if you have given the name space like MyWS, then are you able to access it like MyWS.ClassName ?
Do one think, after adding the reference, Build your application once then try ?
That will resolve your issue.
Thank you !!
|
|
|
|
|
Yes, i have given the name space like MyWS, but i am not able to access it like MyWS.ClassName even after application Re Build.
this is the problem.
|
|
|
|
|
Hi guys, thanks for looking
Im having a little problem with search engines
When i launched my site i was using cookiless session, well, actually it was autodetect
Search engines crawled my site, and asp.net detected them like cookieless browsers, and some links have the session id in the url
Ive set the sessionState cookieless="false" now
But still there are some links with the session id
What i want to do is to detect when a url has a session id and redirect them to the default page, or even better to the requested page but removing the sessionid
Ive tryed this in the global.asax:
Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
If Request.Url.ToString.Contains("(S(") Then '"(S(" just for the time being :)
Response.Redirect("~/")
End If
End Sub
But the url always contains a regular url (without the session id, and im using a url with session id in it)
What would be the best way to accompilsh my goal??
Thanks in advance
Alexei Rodriguez
|
|
|
|