
Hobbes
Avatar/Signature-
Posts
37 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Hobbes
-
If you fill the textbox in the page_load event, use if not isPostback then --> enter your Code here.... End if Most likely, when there is a round trip to the server, it resets the textbox and thus, no changes is made. Hope this helps :)
-
I am having a problem with special characters. I have a input box that will allow visitor to my page to enter messages. However, when the messages contained quotes, single quote, and other special characters, it will show an error when inserting to the DB I manage to fix the single quote ... like so strH = Replace(strH, "'", "‘") but I cannot figure out how to fix the quote (") ... Please help!!
-
I am doing this on a test site - europe.webmatrixhosting.net I tried the instruction on the error message but failed to find the security tab in the properties of the page. Thanks
-
Help! Somehow I kept getting the following exception. I am trying to send e-mail using the system.web.mail ??? Please help..... :confused: :confused:
-
Thanks guys! BungPeng, can you direct to those site? I currently using the sql (with access...) but I found it inefficient coz of the 255 character limit. Kindly advise.
-
I am creating a simple website to allow friends and family to post message into a forum. Is there a simple way to create one? Thank you.
-
Hey guys, I am having problem with my web-config file. I receive the follwing error. I did not have any problems/error when I ran it on my local sever. Please help.... Thanks guys! 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 2: <system.web> Line 3: <customErrors mode="Off" /> Line 4: <authentication mode="Forms"> Line 5: <forms loginUrl="login.aspx" /> Line 6: </authentication> Source File: d:\users\colinsmis\smis\web.config Line: 4 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
-
Thanks Guys! Sorry to reply so late. Have been out of town for the pass month
-
Hey Guys, Could anyone help me? This is urgent. Or maybe is there another way to do all this? Kindly advise... deeply appreciated Thank you
-
Greetings! I am trying to do the following: On Page_load, I filled my DataGrid with records, and also I want only the first record to be display into a bunch of text boxes. The problem: How do I get the value in a particular cell of the DataGrid? Please help. Thank you. :confused:
-
sure... here it is ... Thanks guys! Note: some of the forms not done yet store.zip
-
Add: If anyone is kind enough to, I will e-mail the files for you to try. Please contact me @ l.colin@myrealbox.com
-
Thanks for the reply. I tried it and got the following error. Compiler Error Message: BC30506: Handles clause requires a WithEvents variable. By the way, I developed it using visual studio using sqlConnection. Now I am using webmatrix to do it in MS access Any ideas??
-
Thanks for the reply. :) I have made the changes. However, the problem still exist. Everything runs fine, except for the delete link button that is not responding. It's seems to be missing some on_click event that triggers the "MyDG_ItemCommand" sub. I tried to add onClick event into the linkbutton tag but it gave an error that says: Compiler Error Message: BC30408: Method 'Public Sub MyDG_ItemCommand(Sender As Object, e As System.Web.UI.WebControls.DataGridCommandEventArgs)' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'. <asp:LinkButton ID="RemoveButton" CommandName="RemoveFromCat" Text="Delete" ForeColor="Blue" onClick= "MyDG_ItemCommand" Runat="server" /> Any Ideas?? Thanks!
-
THanks for the reply. I found out that the data connection objects I am using is to my pc sql server! How stupid of me.... :P I am now trying to use MS access just to be able to load it up to the site. please visit http://www.xtremedotnettalk.com/t73646.html if you can help me out :)
-
I got this tutorial from a text book. Instead of doing it in sql server, I am tring to do it using MS access. After changing every thing, I found that the delete record link button will not work. There is no compiling error of any sort. Please help!! :confused: Thanks ****************here's the code************************ Sub MyDG_ItemCommand(ByVal Sender As Object, ByVal e As DataGridCommandEventArgs) If e.CommandSource.CommandName = "RemoveFromCat" Then 'Identify the Cell that Contain the CatID Dim CatIDCell As TableCell = e.Item.Cells(1) Dim CatID As String = CatIDCell.Text Dim CatThumbCell As TableCell = e.Item.Cells(4) Dim CatThumb As String = CatThumbCell.Text Dim CatImageCell As TableCell = e.Item.Cells(3) Dim CatImage As String = CatImageCell.Text 'USe SQL to remove the Cat with CatID = CatIDCell dim dbconn,sql, dbcomm,dbread dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" _ & "data source=" & server.mappath("..\TaraStore.mdb")) dbconn.Open() sql="DELETE FROM Categories WHERE CategoryID =" & CatID dbcomm=New OleDbCommand(sql,dbconn) dbread=dbcomm.ExecuteNonQuery() ' MyDG.DataSource=dbread 'MyDG.DataBind() 'dbread.Close() dbconn.Close() Page.DataBind() 'Find path to image folder Dim strFilePath As String strFilePath = System.IO.Path.GetDirectoryName(Server.MapPath("DeletCat.aspx")) 'Delete Image System.IO.File.Delete((strFilePath & "\..\" & "images" & "\" & CatImage)) 'Delete Thumbnail System.IO.File.Delete((strFilePath & "\..\" & "images" & "\" & CatThumb)) Else End If Page.DataBind() End Sub **************Here's the html********************** <body ms_positioning="GridLayout"> <form id="Form1" method="post" runat="server"> <asp:DataGrid id="MyDG" style="Z-INDEX: 101; LEFT: 17px; POSITION: absolute; TOP: 80px" runat="server" AutoGenerateColumns="False" DataKeyField="CategoryID" Font-Names=" Verdana" HeaderStyle- BackColor="#aaaadd" Font-Size="8pt" Font-Name=" Verdana" CellPadding="3" BorderWidth="1px" BorderColor="Black"> <HeaderStyle backcolor="LightSteelBlue"></HeaderStyle> <Columns> <asp:TemplateColumn HeaderText="Select a Task"> <ItemTemplate> <asp:LinkButton ID="RemoveButton" CommandName="RemoveFromCat" Text="Delete" ForeColor="Blue" Runat="server" /> </ItemTemplate> </asp:TemplateColumn> <asp:BoundColumn DataField="CategoryID" SortExpression="CategoryID" HeaderText="Category ID"></asp:BoundColumn> <asp:BoundColumn DataField="CategoryName" SortExpression="CategoryName" HeaderText="Category Name"></asp:BoundColumn> <asp:BoundColumn DataField="CatImage" SortExpression="CatImage" HeaderText="Image"></asp:BoundColumn> <asp:BoundColumn DataField="Thumbnail" SortExpression="Thumbnail" HeaderText="Thumbnail"></asp:BoundColumn> <asp:BoundColumn DataField="Description" SortExpression="Description" HeaderText="Description"></asp:BoundColumn> </Columns> </asp:DataGrid> [edit]Please use tags [/vb ] [/edit]
-
My application works fine on my pc. However, after I upload the application on the server it gave me an error. It is a application with db using visual studio/vb. I uses ftp to upload it because the server I am using does not support frontpage extention. What could be the problem? Thanks guys! :)
-
Thanks!! :)
-
Greetings! Is there any way to delete a file from a particular folder? Here's what I have to do. I have a database that read and display to the grid containing a image file from a designated folder. I have also create a form to delete records. There is no problem deleting the records, however the image file will not be deleted. I am trying to delete the image file as the record is being deleted. Thank you :)
-
Thank you!! :) Problem solve!!
-
I am trying to upload an image to a targeted folder. (i.e. C:\Inetpub\wwwroot\Store\images\) But my file upload page is in another folder. (i.e. C:\Inetpub\wwwroot\Store\admin\) I use the following code: Dim strFilePath As String strFilePath = System.IO.Path.GetDirectoryName(Server.MapPath("uploadFile.aspx")) uploadFilePath.PostedFile.SaveAs((strFilePath & "\" & "images" & "\" & txtFileName.Value)) lblTitle.InnerHtml = "File uploaded successfully" lblMessage.InnerHtml = "Your file was uploaded successfully to <br>" & _ "<b>" & strFilePath & "\" & _ txtFileName.Value & "</b><br>on the Web server." HideFileUploadControls() HideUserAuthenticationControls() lblMessage.Visible = True btnReUpload.Visible = True HyperLink1.NavigateUrl = "http://localhost/store/images/" & txtFileName.Value HyperLink1.Visible = True The thing is that using System.IO.Path.GetDirectoryName(Server.MapPath("uploadFile.aspx")) I am uploading it to "C:\Inetpub\wwwroot\Store\admin\" Any one have any idea to load it into my desired folder?? Thanks :)
-
add: I am the administrator. This is my laptop.
-
How do I create one or do I need to create one? Thanks :)