|
Thanks for the input. I guess by "the problem" I mean the problem that I know what needs to but done but not exactly the best technique to go about doing it. Not sure how exactly I am going to list the files on the site for each file that is in the directory when I search for the files. Thanks for the reply.
|
|
|
|
|
Hi,
I want to work with some data with an ObjectDataSource. The data comes from a DB table which have two fields: ID (primary key) and Title.
I have created such a class:
[System.ComponentModel.ObjectData(true)]
class Biz
{
public Biz() {}
[System.ComponentModel.ObjectMethod(Select)]
public DataSet FetchAll() { ... }
[System.ComponentModel.ObjectMethod(Update)]
public void Update(int Serial, string Title) {...}
}
I have assigned this class to my ObjectDatasource. And I show the records with a Gridview control. Since ID field is PK it must not be update. so I make Id field Invisible or Readonly. Then when updating the records, only Title field is edditable. Afterwards, in Update method, Serial parameter is always 0 (becasue Id was not editted) and only Title field has a correct value. I need Serial field's value to update the Table because more than one person may have the same name. I have written a code in GridView's RowUpdating event and bypassed the Biz.Update method but I am quite sure it is a wrong job.
Please let me know what to do to make the ObjectDataSource update records by itself.
Thanks
Aref
|
|
|
|
|
I am having a problem updating a table field in my database. Note that I am using Visual Web Developer 2008 Express.
I am using the asp_XYZ tables for membership, etc. My table (MyTable) contains a UserId field, which comes from the aspnet_Users table. The field I wish to update is MyField and is of type 'image'
I would like to populate my WebForm/FormView with MyField and allow the user to edit/update it. I do not have a problem populating the view, but cannot figure out the UpdateCommand. BTW, my SELECT command is something like this:
SELECT MyTable.MyField
FROM MyTable
INNER JOIN aspnet_Users ON MyTable.UserId = aspnet_Users.UserId
WHERE aspnet_Users.UserName = @UserName
I cannot figure out how to update. When I use the Configure Data Source wizard, it only allows me to choose fields from one table. I thought that I would be able to specify MyTable.MyField as a field to update and aspnet_Users.UserName as a field to filter. Confusion is setting in...
Since I thought I basically knew what my eventual UPDATE command was going to be, I went ahead and typed it myself. The following is that command and its UpdateParameters.
UPDATE MyTable
SET MyField = @MyField
FROM MyTable INNER JOIN aspnet_Users ON MyTable.UserId = aspnet_Users.UserId WHERE (aspnet_Users.UserName = @UserName)
asp:Parameter Name="MyField"
asp:SessionParameter Name="UserName" SessionField="UserName"
When I used the above command/parameters, the following exception was thrown:
"System.Data.SqlClient.SqlException: Operand type clash: nvarchar is incompatible with image"
Obviously, I am no SQL expert. Can someone explain where I am going wrong? Any comments on my approach are welcome.
Thanks.
|
|
|
|
|
I think you need to define the type of parameter.
With SQL command, we used to do like that
<br />
this.sqlCommand1.Parameters.Add("@Picture",<br />
System.Data.SqlDbType.Image);<br />
this.sqlCommand1.Parameters["@Picture"].Value=this.ImageByte;
|
|
|
|
|
I installed IIS server in 2003 operating system and it is installed successfully and iam changed the port no to 90.problem is typing localhost (or) also i given my host name and port no in web browser it is not giving my 2003 o/s home page why it is not giving.
What should i do. Is this IIS installed successfully or not.
|
|
|
|
|
If you are hosting the website on Windows 2003, you need to enabled the ASP.NET script in IIS.
|
|
|
|
|
How the hell does this happen?
My CSS page for the site is not loading. Using firebug, it turns out that a 404 (File not found) is being returned. WTF? This is local to my machine, how the heck is this happening?
This is the first time it has happened but nothing is fixing it. I've restarted my laptop and still nothing
The website if File System Based rather than IIS based.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
Is there something missing in a reference somewheres?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
It appears that VS 2008 F-ed up the associations. I restored a back up and now the sub is shining again. Thank God for backups
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
As you are using Firebug, you can check the url of 404 CSS. and if you got the url then I think you will be figure out the problem..
|
|
|
|
|
Is there a trick to including jQuery (the intent is to add ThickBox) into ASP.NET master pages?
It works fine on an html page, but when I add it to the master page, I get a "CS1056: Unexpected character '$'"
Here's the code in the of the master page:
<br />
<head runat="server"><br />
<title>Untitled Page</title><br />
<link type="text/css" rel="Stylesheet" href="../css/default.css" /><br />
<link rel="stylesheet" href="../css/thickbox.css" type="text/css" media="screen" /><br />
<br />
<script type="text/javascript" src="../js/jquery.js"></script><br />
<br />
<script type="text/javascript"><br />
jQuery.noConflict();<br />
<br />
jQuery(document).ready(function(){<br />
jQuery("div").hide();<br />
});<br />
<br />
$('someid').style.display = 'none';<br />
</script><br />
<br />
<script type="text/javascript" src="../js/thickbox.js" runat="server"></script><br />
<br />
</head>
Am I doing something wrong that I can't see?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
Mustafa Ismail Mustafa wrote: // Use Prototype with $(...), etc.
$('someid').style.display = 'none';
Is that code required? (You are not referencing the prototype but you used $().) I think that you won't need this line.
|
|
|
|
|
I honestly don't know Mike. I've wasted 2 days trying to get either LightBox or ThickBox to work on my site. Neither did.
SO...
I've decided to write my own gallery control :sneaky:
As soon as I'm done with my ABE article, coming up real soon.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
If you want to use the Lightbox, I can help you.. I love that box and used it for a lot of projects..
You can read the instruction from this link http://www.huddletogether.com/projects/lightbox2/[^]
there are only 5 steps to do.. I suggest you to try and take a look.. let me know if you get any error..
|
|
|
|
|
I tried for 2 days, VS2005 simply didn't want the JS, it didn't like it. Then again, I'm not a web developer and this project (my site) is setting out to improve that.
I'll tell you what, when I get back home from work today, I'll go through it again and give you a shout on this thread telling you what's happening. Deal?
And thank you
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
is it possible to hide a row in a grid view but the count should be the same no of rows in a grid view
|
|
|
|
|
|
how to Rectify when config error comes when new project connected to asp.net project
Error1.
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. D:\cxml\CMS\CMS\Web.config
2. any downloaded project is added to the asp.net project or www.root while run the program the
error comes in the web config
pls solve this above error mail it
chandra
|
|
|
|
|
Most error message are very informative nowadays. The error message that you got both explains the reason for the error and how to correct it.
A web.config file containing application level settings can only be placed in the root folder of an application. You have placed it in a folder inside an application. You have to configure the folder as an application in IIS using IIS Manager.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
can any one help me create the pdf file from database table because the crystal report in very heavy on the server
|
|
|
|
|
You can google about that. There are a lot of examples for creating pdf file.
Ravi_21 wrote: the crystal report in very heavy on the server
Not sure what you meant.
|
|
|
|
|
|
Hi,
I want to deploy a website for my company on there server.What do the server need to operate the website?.Is it necessary to install visual studio.net on the server?.
I am too late but i will never give up
|
|
|
|
|
The server should contain IIS and Dot Net Framework ..
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Thank you for your respond...
1-You mean that I need to have only the IIS and .NET framework 2.0 installed on the server(without VS2005 being installed)?.
2-If this is what you mean are the source files(.aspx.cs) required on the web server?or I need only the .aspx files and the DLL files in a bin folder in a virtual directory?
I am too late but i will never give up
|
|
|
|