|
No actually i'm storing the images directly in the database
and now i want to fetch all the images stored in the database into the datagrid........
|
|
|
|
|
Get it aspalliance.com
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
|
Friend,
I've stored the path of the images in my database but i'm not getting how to show the images in the datagrid. And further i've also taken template to show the images in the grid......
Plz letme know how to do it......
|
|
|
|
|
Add a image filed from Editcolum section
provide in Data Section : DataImageUrlFiled= <database filed name>
This is sample code !!!!
-------- This section inside grid view ----------
here pic_name is the filed name of ur database image path
<asp:ImageField DataImageUrlField="pic_name" HeaderText="Image" ReadOnly="True" >
<asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="SELECT * FROM [Page_table] WHERE [page_id] = @page_id"
</asp:SqlDataSource>
---------------------------------------------------
Hope now u can understand .... if u have still any problem let me know !!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
|
1 file.SaveAs("F://images/" + file.GetName(), true);
this was successfully stored in folder
but
2 SqlCommand sqlcmd = new SqlCommand("insert into tblCategories (CatImage) values (@CatImage)", sqlcon);
sqlcmd.Parameters.Add("@CatImage", file.GetName ());
sqlcmd.ExecuteNonQuery();
here
error:nvarchar is incompatible with image
I gave datatype for CatImage is image.
so wat i have to do.
regards
kishore
|
|
|
|
|
I wrote a longer answer but the forums crashed and IE lost it.
the error means what it says. Try reading a book on SQL instead of making a wild guess. You're passing a string into a field and instead of a string (nvarchar), it's an image (binary data). Fix your data types, in accordance with your error message, and it will be fine.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I want to do write protect a drive to all system users using Vb dot net. For that i am using the below code. But I am getting Deny permission for the "special Permission" of the selected Drive. Not for the write permission.
Please see the below code.
======================================================
Dim folderLocation As String = "F:"
Dim mydir As New DirectoryInfo(folderlocation)
Dim dirsecurity As DirectorySecurity = mydir.GetAccessControl
Dim fsec As FileSecurity
Dim domain As String = LCase(Environment.UserDomainName)
Dim username As String = Environment.UserName
Dim Drive As String = "F:"
fsec = File.GetAccessControl(Drive)
For Each rule As FileSystemAccessRule In dirsecurity.GetAccessRules(True, True, GetType(NTAccount))
username = rule.IdentityReference.ToString()
MsgBox(".[" + username + "]")
fsec.SetAccessRule(New FileSystemAccessRule(username, FileSystemRights.WriteData, AccessControlType.Deny))
File.SetAccessControl(Drive, fsec)
Next
==================================================
I want to that am i doing proper method or not. if not please suggest the correct way to me for doing the write protect a single drive .
Gopi Ramanathan,
Life will never be the SAME
|
|
|
|
|
This is obviously not an ASP.NET question. Try the VB forum
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi all,
i developed my application using Asp.Net and Sql Server.
its running fine in my local system and when i move all my content to the server its throwing the following error under web.config file.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 93:
Line 94: <system.web>
Line 95: <authentication mode="Forms">
Line 96:
|
|
|
|
|
The error means what it says. Do you have a virtual directory set up at the level of the file throwing the error ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I think you have not configured virtual directory.
Shujaat
|
|
|
|
|
can you guide me how to configure Virtual Directory?
I am using Windows Vista, (VS2005)ASP.Net2.0, SQL Server 2005.
please guide me how to configure virtual directory
|
|
|
|
|
Do you have iis installed on your system ? if not get it installed first.
Then Goto Start--> Run and type inetmgr and click ok
This will open iis manager
Now there must be atree with your system name
It will be containing a node name websites under websites there will be a node default web site now under this node find your project folder and right click on it and goto properties and in front of application name click create this will create virtual directory.
Shujaat
|
|
|
|
|
After Creating Virtual directory i am geeting the following error while running the application under Server
Server Error in '/Modules' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The URL specified in the config file is invalid.
Source Error:
Line 63: <system.web>
Line 64: <authentication mode="Forms">
Line 65: <forms name="frmLogin" loginurl="D:\Domains\i-vertys.com\wwwroot\modules\Login.aspx" defaulturl="D:\Domains\i-vertys.com\wwwroot\modules\\Member\Member.aspx">
Line 66:
Line 67: <authorization>
Source File: D:\Domains\i-vertys.com\wwwroot\modules\web.config Line: 65
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
|
|
|
|
|
bhattiprolu wrote: defaultUrl="D:\Domains\i-vertys.com\wwwroot\modules\\Member\Member.aspx"/
That's not a URL, it's a file path. Try putting URLs there. The base of your app ( probably wwwroot ) is the base of your URLs
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How Can I Handle Serverside Checkbox List Control in Javascript?
I want to count ListItems in Checkbox list......How can I?
|
|
|
|
|
The first step is to write the client side Id of your server control as a variable in javascript, then you can use document.getElementById to access it, and do whatever you like with it
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how can i link my button in other webform? Here what I want to happen example
if my text1 is equal to "admin" and my password is equal to "12345" then after i click my button it will go to my access.aspx else it will go to failed.aspx. Pls somebody help me regarding this matter. Thank you...
|
|
|
|
|
1 - try using descriptive subject lines
2 - Response.Redirect is what you want
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sir thank you for answering my question.
|
|
|
|
|
hi
I have used asp instead of asp.net in my application as per my proj req't.
I have a page that contains processed variables that I'd like to
forward using the response.redirect method. However, because the
response.redirect contains the page within "pagename.asp", I have not
been able to pass the variable. I've tried concatenating it, by doing
respone.redirect ("Http://192.168.10.20/Download.asp?=" & downloadfilename & "id=" & m_id & "from=" & m_usertype &"type=" && "status=" & m_status & ), actually the ip address in the url above is the ip address of another systems ip address. What I should do to include this, or
is there any other way I can pass the variables when I'm using the
response.redirect method?
Regards
sunil
|
|
|
|
|
sunilwise wrote: I have used asp instead of asp.net in my application as per my proj req't.
That's really sad for you, I hate ASP. It also means you're in the wrong forum, and you must know it, b/c you know that ASP.NET and asp are not the same thing.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How show calander in dropdownlist using by asp.net
|
|
|
|