SEARCH YOUR SOLUTION HERE  

upload asking for log in

I have an upload control in a subdirectory under a website that is anonymous. The subdirectory has integrated auth enabled and in my web.config I configured identity impersonate = true and allowed authenticated users on this subdirectory. Need this to have authentication on it so can communicate securely with database. The file under here can be accessed by anyone on our network.

Within this subdirectory there is an admin folder. This admin folder should only be accessible by a domain group I set up locally on the server. I created a section in the web.config for this admin directory to allow roles = "domainGroupName" and deny all other users. The admin folder contains an upload feature and when I try to upload a file it asks me to log in then I receive access denied to the documents directory, which is located under the same subdirectory as the admin folder. I have set IUSR, Network Service, Asp.Net user, and domainGroup all have write access to the folder. Also enabled write access in IIS to no avail.

This does work when I create this part of the application as its own site under IIS but not as part of this anonymous site which is where the customer would like it. Is it possible in .net to upload files under a subdiretory that requires integrated under an anonymous site

I have tried creating the subdirectory as an application but then .net wants me to recreate the masterpages, css, etc in the subdirectory since it then sees it as a separate app. At that point I might as well keep it a separate site and hard code the links.

Any one out there have any ideas

Posted On: Tuesday 1st of January 2013 11:44:35 PM Total Views:  192
View Complete with Replies




Related Messages:

Visual Web Developer 2008 Express Edition   (205 Views)
I have the following code to pass data to a new page... Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim ddlList As DropDownList ddlList = CType(Form.FindControl("DropDownList1"), DropDownList) Dim strSelected As String Dim MedURL As String strSelected = ddlList.SelectedValue If Not (strSelected = String.Empty) Then MedURL = "medications.aspx" MedURL &= "&PtNumber=" & strSelected Response.Redirect(MedURL) End If End Sub How do I add a Bound field to MedURL from a Formview field..
XML in ASP.NET   (88 Views)
! i have programming XML files using XSLT. but i cannot add a button or links so that i can come with another solution such ... and so on. someone told me that i can use PHP and ASP for that. but i am interest to do it on ASP.NET since i have used it before. i am a little bit confuse on it. can someone show an example where i can use ASP.NET to display the XML files according to what we want what programming language that need to be use VB.NET it is necessary to use the XSLT in the coding.
Linking asp.net to other html   (158 Views)
.. I'm having a hard time in solving my problem regrading about linking asp.net to another html.This is my code in linking, i know i have a mistake in this. i hope you could give a correction on it. HyperLink i used a hyperlink in order to use a certain page as part of my asp.net.
Reading CPUID from ASP.NET web application   (117 Views)
Hi everybody, Is there anyone who can guide me about how can I read the CPUID from my web application My application has a backend MS-SQL db that stores all the data including user name password etc. I have imlemented client auth as a requirement but also need to implement the CPUID based authentication for the users to get access to the ASP.NET application. the requirement flow is as bellow: https://[web address] the server checks the client certificate for initial security users key ins the user name and passowrd and then login. ---> here I want to put another authenticaton system with CPUID which will be not visible to the user. So only the designated system can get access to the web application. So the login to the web application will be in combination of username, password and the CPUID (pre-defined in a db table) Plese show some light in this situation.
Dynamic Asp.net Table Cells Disappering   (315 Views)
I am trying to add cells from the code behind to an asp.net table. When I debug this I see that the first cell is added fine and when it hits the next add dtCell.Text = .Item(0) Me.Table2.Rows(1).Cells.Add(dtCell) the previous cells that were added are no longer there. Is there a workaround for this I am using a asp.net table since I need to display data in vertical columns and cannot use the gridview since it displays horiziontal Does anyone know of a better way to display data in verticall columns besides a html table and populate from a datatable I found some datagrid work arounds where it rearranges the data, but you cannot format the grid. 'dt = datatable can be 0 - xxx rows Dim x As Integer Dim dtCell As New TableCell dtCell.Text = "" Do Until x = dt.Rows.Count With dt.Rows(x) Me.Table2.Rows(0).Cells.Add(dtCell) dtCell.Text = .Item(0) Me.Table2.Rows(1).Cells.Add(dtCell) dtCell.Text = .Item(1) Me.Table2.Rows(2).Cells.Add(dtCell) End With x = x + 1 Loop
Need code for online railway reservation system using asp .net   (185 Views)
I have no knowledge about asp.net. I would like to learn it and be strong in it. My project deadline is very near.Hence i would like to get some help regarding the coding for online railway reservation system using asp.net
PORT   (149 Views)
When im trying to make a web service I usually use the IIS Web Server as my "Servers" using VS 2003 but when I try to make a web service in 2005 they dont accept IIS Web Server option, it shows an error. Attached image(s)
Losing Focus upon Postback to URL window   (249 Views)
Firstly I am new to ASP so apologies if i have missed the obvious here!!!I have a page with two text boxes on it. The idea is for upon initial load the focus is on box1. I am after scanning a barcode into this box which I want it to navigate away upon finding the CRLF from the barcode reader. It should then run some code which will populate some labels with info and then finally set the focus to the second textbox ready for a job barcode scan.Upon this second scan, this will then execute some other code that will read a db and populate more labels ready for the user to select the status of this job and press a button which will update the db of such.I have it currently so that the page loads and correctly focus' to textbox1. However, upon losing focus from this box (currently by hitting TAB) it kicks the postback routine and upon returning sets the focus to the URL of my page and not the second textbox even though I have it set as the next item in the tabindex list.I've tried an if statement which kind of says if not postback set focus to box 1, else box 2 yet it still ignores the second box's setfocus.Any ideas appreciated!
asp menu from database   (145 Views)
i have an asp menu i am playing with and have it working with an xml file, but all ive read dont explain too well on pulling from a database. Are there any samples that you have found that will helpI think im just stuck on how to setup and query the menu table to generate the expected format.How would i best setup the table to allow for menu options depending on the user rolesheres the working xml, i know i just change the xmldatasource to a sqldatasource, but again, how would i query the table to generate the submenusCODE static xml fileCODE
xml Deserialize   (143 Views)
I have a class file that is filled and then serialized to xml and sent to a server. I get my response back and then need to Deserialize it. The problem is that I can get back one of two messages. Either an xml_Error message or the other message which means everything is a success. How can I tell which message I get back before I try to Deserialize back into my class. Thank you.
in kiosk-mode can I also disable right mouse click   (186 Views)
Hi I have an asp.net intranet app. that runs in kiosk modeI was wondering if its possible to also disable the right click button as the menu options which I hide in kiosk mode open up on right click
Divs printing in different position   (170 Views)
I am trying to use a repeater to print a multiple form and map data to the form. The form itself is stored as a gif and I'm trying to map to sections on the graphic so that my database fields print in boxes, etc. I have managed to achieve this as far as viewing the data on the screen but when I print the screen my data items print in completely different places. I'd be grateful for any advice on how to fix this or on an alternative way of achieving what I'm trying to do.WorkSheet
Reading multiple recordsets using ExecuteXmlReader()   (225 Views)
This is about XML in .NET 1.x. I'm trying to use multiple recordsets in the same SPROC, calling them via SqlCommand.ExecuteXmlReader(). Is there a way to emulate SqlDataReader.NextResult() to move through each recordset I know that method isn't available in XmlReader.I figure if this doesn't work, I can use a regular tabular recordset with a SqlDataReader and use a XmlTextWriter and construct everything by hand as one big document.
Web Grid lookup problem   (88 Views)
I'd appreciate an approach to solve the following problem, which I'm attempting to build with the web gui tools.I have two SQLServer tables: Creditor and lender, where the lenderid in the creditor table points to the lenderid (primary key--identity) of the lender table. The lender table also includes a lenderName.I have a editable web grid on the creditor table.. I'm using datasets to represent all the tables (probably unnecessary, but that's where I'm at...I'm a newB after all.The first column (called lender) is a template column on lender. I want the lender to show the current value of the lenderName as a label or textbox. This rewuires a lookup in the lender table). I want the lender to show a dropdown list of lender names, with the current one selected.I have accomplished the by having a sqldataptor/dataset showing the lender last names... with some logic to perform the selection in the UpdateCommand of the grid.I can't figure out however, how to provide the LenderName in the I've tried feeding in views and relations a well as combinations in datasets (where I use a relation for the select statement, but normal creditor update/insert/delete queires.What would seem to work best, is to have the lenderName already included in the creditor table. It seems like it could be done with a computed column in that table, but I can't find info on how to do that...I'm open to any suggestions ...seems like this should be a pretty common situation.
Looping Through a dataset   (179 Views)
My application has a dataset which contains the contents of a view in my SQL server database.I have used the WriteXML method of the dataset object to create an XML file with all of the items in the dataset in it.What I want to do now is create an XML file for each item in my dataset as opposed to the whole dataset.The kind if thing I am trying to do is along the lines of:For each item in Dataset dataset.WriteXMLNext itemSo my questions is what is the easiest way to loop through a datase
VS2005 TreeView Problem   (62 Views)
when tyring to hard-code databinding to a tree view in VS2005, the following code says that there is no definition for 'RunQuery' in the current context.void PopulateCategories(TreeNode node){ SqlCommand sqlQuery = new SqlCommand("Select * From Categories"); DataSet ResultSet; ResultSet = RunQuery(sqlQuery); if (ResultSet.Tables.Count > 0) { foreach (DataRow row in ResultSet.Tables[0].Rows) { TreeNode NewNode = new TreeNode(row["CategoryName"].ToString(), row["CategoryID"].ToString()); NewNode.PopulateOnDemand = true; NewNode.SelectAction = TreeNodeSelectAction.Expand; node.ChildNodes.Add(NewNode); } }}is this a VS2005 Beta bug or is ti fixable
pop-up calendar   (175 Views)
I want to extract a selected date from a calendar and not to display it on my window permanently.I tried to create a calendar object in the moment that I press a button but the calendar doesn't seem to apear.Still, it exists, as I can display the selected date.I thought maby someone was confrunted with the same problem as I did, and whants to help me!Thank You!Maria
session arraylists   (164 Views)
hallo,I would like to add items to an arraylist during a session. The arraylist should increase its item during the session and not loose previosly added items.I tried with this code but it doesn't work:Session("SelectedL.Add(sender.id)")Session("SelectedL").Add(sender.id)do you know how
ado.net dataset select statement   (188 Views)
I've filled an datatable with an query from a database. I now need to select data from the datatable. Can I write an sql statement to further sort/find data from the table. Can anyone provide the proper syntax or links on how to do this Thanx
Sort datagrid with out refreshing the data   (115 Views)
HiI have a question. Can I sort the data in a datagrid with out having to go out to the database again. Also, I want to add paging. When I do the paging and sort a column the whole data set gets refreshed and my sorting is lost.So what I would like happen is this1. not have to go out to the database each time I sort a column. 2. when I sort the column, leave the sort even when i move pages.I think that i am asking for is not to complicated but i can not figure it out.
.GetFiles and .GetDirectories ... slow ...   (171 Views)
Good Morning! I'm wondering if anyone knows of a faster way to iterate through the file system than GetFiles and GetDirectories. These work fine where there aren't that many files. But when I have to load several hundred or a few thousand files it gets pretty slow. I'm displaying the files on the web as links that the user can click on to launch the documents.
export data to word   (203 Views)
how can i export the data contain in a web form, to an existing word document
DataBoundLiteralControl in datagrid EditItemTemplate   (179 Views)
I have a datagrid with a boolean BoundColumn MyBool, --- Column[0] a Template column MyTemplate, --- Column[1] a BoundColumn MyBound, --- Column[2] and an Edit/Update/Cancel button column.--- Column[3]The datagrid is editable, with a twist: the user may edit the MyBound cells in any of the rows, but may only edit the MyTemplate cells if the MyBool cell in that item is False.I have it so that when the Edit button is clicked for a particular row: - If MyBool is False, there is a textbox in MyBound and in MyTemplate.- If MyBool is True, there is a textbox in MyBound, but MyTemplate is read-onlyThe ItemTemplate and EditItemTemplate for the MyTemplate column are as follows: In the code behind:public string SetMyTemplateEditMode(bool MyBool, string MyTemplate){ if (MyBool) { return MyTemplate; } else { return ""; }}The above creates a DataBoundLiteralControl at runtime when MyBool is false: A textbox shows in the grid in the MyTemplate column.So far, so good - the datagrid does what i want.My problem is this:when the user hits the Update button, i want to pick up what they've entered in the textbox, and with that update the relevant DataRow in the DataSet the grid is based on. I have been trying to do this for hours and i can't make it work!!!With e being DataGridEventArgs in the Update event: string x = ((TextBox)e.Item.Cells[1].Controls[0]).Text gives me a "specified cast is not valid" errorThe control's type is DataBoundLiteralControlso the following: DataBoundLiteralControl myControl = (DataBoundLiteralControl)e.Item.Cells[1].Controls[0]is fine, but myControl.Text is readonly for DataBoundLiteralControls and returns " rather than what the user has input.I tried casting to a HtmlInputText control, which also returns a "specified cast" error.So now I'm really stuck!If anyone has any ideas, I'll be eternally grateful!TIA
Dropdownlist OnSelectedIndexChanged not firing   (133 Views)
I can't get the OnSelectedIndexChanged event to fire on a dropdownlist control.Here is how my page is designed:When my page loads, I have a dropdownlist with a list of states. When the user changes the dropdownlist, the AutoPostBack fires and runs a sub that loads & shows a second dropdownlist that shows cities for the state selected. The problem occurs when I make a selection from the city dropdownlist. Nothing happens.Here is my dropdownlist: Here is the code in a codebehind page:Public Sub GetATMList(sender As Object, e As System.EventArgs)'This sub loads the ATM's for the city selected. Dim objConn As SqlConnection Dim objSQLCommand As SqlCommand Dim objDataReader as SqlDataReader Dim strCity as String = drpCityList.SelectedItem.Text if UCase(strCity) "NOW SELECT A CITY" then 'Set up our connection object and SQL command object. objConn = New SqlConnection(application("WSFSQLConnString")) objSQLCommand = New SqlCommand("AD_s_GetATMByCity", objConn) 'Set the stored procedure. objSQLCommand.CommandType = CommandType.StoredProcedure 'Add parameters. objSQLCommand.Parameters.Add("@City", strCity) 'Open the db connection & Execute Command objConn.Open() 'Execute the procedure. objDataReader = objSQLCommand.ExecuteReader() 'Now bind the datareader to the repeater. grdATMs.DataSource = objDataReader grdATMs.DataBind() 'Close the DB connection. objConn.Close() end ifend Sub 'GetATMListI tried to change the sub to set the value to a label, thinking maybe there was something wrong with the value of the dropdownlist. But it didn't work either.What am I doing wrong
Abort page execution   (202 Views)
i'm trying a code to update a html div using ActiveX or XMLHttpRequest from client side and a asp.net page that retrieve data. The asp.net page is a loop for some seconds and then i do it again the request.My javascript from client side is like this:function Tracking(U,M,V){ var a=window.ActiveXObjectnew window.ActiveXObject('Microsoft.XMLHTTP'):new XMLHttpRequest; try{a.open(M,U,true);a.send(V);}catch(c){a=null;alert('Exception: '+c);}return a;}var MyRequest=Tracking('async/mypage.aspx_r'+(Math.random()*999).toString(),'get',null);function Abort(){MyRequest.abort();}function ViewRequest(){ /* Some code MyRequest.responseText .... */}And the server side: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim StartDate As Date = Now While Now.Subtract(StartDate).Seconds < 15 ' Response.Write (something).... Response.Flush() Response.Clear() System.Threading.Thread.Sleep(50) End While End SubNow, when i try abort the page request by client side, i call the function Abort and the request is stopped but mypage.aspx still in execution to complete the operation for some seconds. How i do it to stop the execution before 15 seconds by client scriptany idea on how I can do thi
Import Visio Document to Visual Studio   (233 Views)
Is there a way to import a visio document into visual studio for web devolopment
details view update problem   (155 Views)
HI ,i have a curious problem I cant work out. i have a details view control bound to a SQL2000 table on my asp.net web page. I have one particular filed that is causing me a problem when trying to update the field. the field is a text box bound to a varchar(1000) field in the database.if i enter the text abc123 into this field on the control and hit update all is well but if i enter;
How to get the value from javascript to insert to mysql   (148 Views)
I am doing the add row table by calling the javascript function in asp.net.The add row table is successfully created, but the problem is that i want to save the data in the columns and rows which have been added by the user. The problem is how am I going to get the value from javascript to insert into the db Below are part of my code: Type of business License No. Remarks var arr_id = new Array(); total = 0; arr_id[total] = ''; total++; ///////////////////////////////////////////////////function addRow() { var tbl = document.getElementById('table1'); var lastRow = tbl.rows.length; // if there's no header row in the table, then iteration = lastRow + 1 var row = tbl.insertRow(lastRow);// Type of bussiness var i = 0 var Bus = row.insertCell(0); var Business = document.createElement('select'); Business.name = 'BusinessType' + iteration; Activity.options[i] = new Option('', ''); i++; Bus.appendChild(Business);// Licence No var Licence = row.insertCell(1); var LicenceNo = document.createElement('input'); LicenceNo.type = 'text'; LicenceNo.name = 'Licence' + iteration; LicenceNo.id = 'Licence' + iteration; LicenceNo.size = 7; Licence.appendChild(LicenceNo); // Remarks var Comment = row.insertCell(2); var Remarks = document.createElement('input'); Remarks.type = 'text'; Remarks.name = 'Remarks' + iteration; Remarks.id = 'Remarks' + iteration; Remarks.size = 7; Comment.appendChild(Remarks);****** This is the part that should save into the db, but i have totally no idea how to do it.. If Request.QueryString("step") = 2 Then End IfCan somebody pls help.. it is quite urgent..
Caching Questions   (165 Views)
,I have a page I built that a FLASH movie that loads and XML data file with a bunch of songs in it. It loads very quickly. The problem I'm seeing is that the Images for the songs are loading each time there is a request. I want to cache them (obviously) or load them all at once. I'm not too familair with caching so I'm looking for some guidance. The images are pulled through from a image processor that resizes them and stuff. Here is the page:http://wisetopic.com/profile/UserId=57Here is what one "Song" looks like (an xml node)CODE Happy Valentines Day! /ImageProc.ashxImage=albm_16_633069117976359969.jpg&width=75&cropHeight=30 SomeMp3.mp3 102 Jenni Quick 5895402 4:05The image proc script is prolly the place to cache the images right I'd like to load them all... what is the best solution to my problem Thank you!!-- Jenni
Input string was not in a correct format   (191 Views)
I am using the update feature in a gridview in ASP.NET 2005I am passing parameters to a Stored procedure which seems to work, but when the page is loading up again I get the error Input string was not in a correct format. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.FormatException: Input string was not in a correct format.If I close the page and reopen it, it has the new values so it did update.I think my problem might be coming from my DDL and my stored procedure because when I tried to make the value of my ddl Type_ID it crashed everytime so I had to make the text = Type_Name and the value Type_Name then I got the ID in my stored procedure.So I am including my Stored procedureCREATE PROCEDURE DBO.UPDATE_REMARKS -- Add the parameters for the stored procedure here @TICK_ID VARCHAR(25), @DATE VARCHAR(50), @REMARK_TYPE VARCHAR(50), @NOTES VARCHAR(1000) ASBEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @REMARK_ID VARCHAR(50) SET @DATE = (SELECT CONVERT(VARCHAR, CONVERT(DATETIME, @DATE, 101), 101)) SET @REMARK_ID = (SELECT TICK_TYPE_ID FROM TICK_TYPE WHERE TICK_NAME = @REMARK_TYPE) UPDATE TICKS SET TICK_DATE = @DATE, TICK_TYPE_ID = RTRIM(@REMARK_ID), NOTES = @NOTES WHERE TICK_ID = @TICK_ID ENDG
Question / Binding gridview to a web service   (98 Views)
Hi folks,I'm a complete .NET newbie, in way over my head. :) I'm familiar with some of the .NET concepts, but I only know enough to be dangerous. I'm currently faced with the task of writing a .NET form that will basically retrieve some data from a vendor-provided web service and display it in grid format.I've added a web reference to the service. No problem so far. The service provides an operation called ExecuteSQLtoXML, that takes a GUID, password, and a SQL string, and returns an XML document with the data. The vendor provided this little snippet of code for information purposes, although when I threw this in my page_load, it didn't like the Xml.XmlNode bit:Dim nCan As Xml.XmlNode = mySoap.ExecuteSQLToXML(sql, guid, password) Right now, the form I have created has essentially nothing but a GridView object. After a few hours of googling and looking at various tutorials, I've realized that I simply have no idea how to tell the GridView to use the results of the ExecuteSQLtoXML operation.I realize I'm probably missing about 500 fundamental concepts I should understand between here and there, but FWIW this is where I stand right now.Any idea
Tracking RSS Feeds   (186 Views)
;I have an ASP.NET 1.1 in which I generate an RSS file based on the current podcasts available on the site.Does anybody know a way that I could track the number of subscribers to my RSS feedAny and all help will be greatly appreciated! Sean.
Page tranfer using button   (161 Views)
I have an ASP button that I want to perform a Server.Transfer when clicked. For some reason, when the button is clicked, the _Click event isn't fired and the page just performs a postback. I've that my _Click event is properly attached to be button, so I know the binding isn'the problem.Any suggestions--B "Life is too important to be taken seriously" --Albert Einstein
Datagrid: Multiple Rows Per Dataset Row   (438 Views)
If a row of data in a dataset has a lot of columns the row displaying thedata in a datagrid will run way off the screen. What I'd like to do isdisplay a row of data over two datagrid rows so the user doesn't have toscroll horizontally. Essentially, I want to wrap a datagrid row (not text inindividual columns) with as much control as possible. For example, 10 columns on the first row and then 3 columns on the second row for the same physical record in the dataset.Is this possible Or is a datalist the only straightforward way to do thi
Creating a link that includes a querystring variable.   (202 Views)
I would like to create a link in the html that includes a variable for the querystring.Is this how I would do itiUserId is the variable I need to include.CODEReturn to Men
Secure Image upload   (195 Views)
I'm building a website that will allow users to upload images.I want to ensure that they only upload jpg or gif.I could just check the extension, but that seems very insecure to me.So, I want to prevent people being able to upload files (an exe for example) with a jpg or gif extension.Further, I want to flag images that may be inappropriate i.e. I want to prevent people uploading porn. I was thinking I could look at the pink contentThoughts
Starting From Scratch   (162 Views)
First a little background information. I currently work as a database analyst and use mostly SQL Server, and Crystal Reports. It has been recommended by a friend of my boss and I that we look into using ASP for some of our report/data deployment. I have a little experience with VB.NET but other than that no real programming or web development experience. I would like to see about learning ASP.NET mostly for personal development and hopefully fatten the paycheck as a result of the new found skills.With my VERY limited experience where would be a good place to startI did a search but didnt find anything where a person was starting with as few skills as my self
windows XP   (240 Views)
forgive me for being dim. I have XP SP2 and have installed VS.NET, .NET framework 1.1 and ASP.NET framework 1.1 and FP extensions 2002, but can't get my machine to run aspx files that are being served out be the webserver on the PC when I browse to them with IE6. Instead it asks if I want to open or save them (and open goes to Visual Studio .NET).Presumably I have missed a step somewhere that maps in IIS 5.1 the ASPX extension to the appropriate program on the PC Please point me in the right direction or to the appropriate docs
Formatting Unbound Datagrid Columns   (220 Views)
HiCan anyone tell me if I can do centering on a datagrid column when the datagrid does not use bound column
File Selector   (211 Views)
I am trying to create a button that when clicked, opens up a windows for you to select a file on a network. I doesnt have to have the ability to open the file, just select it. (I would work like the CommonDialogBox would work on VB6) Has anybody got any code that does this I want it to work with asp.net with vb.net as the langaug
Disabling page via javascript   (254 Views)
Not wanting users to double-click buttons or navigate from a page after clicking a Save button I incorporated a javascript. The script loops through the form elements using getElementsByTageName('INPUT') then sets the element's disable property to true. I add an attribute to the Save button's onclick to call this javascript function.Problem is the server click event is not firing because the javascript runs before the Save buttons Server click event. I have wired the javascript call from the Save button using onmousedown, onmouseup but still get the same behavior. I figure the Save button itself is getting disabled then the server-side event is not firing so I altered the javascript to ignore the button that was clicked (the Save button) ... still get the same results ...any ideas
Dreamweaver and ASP.NET   (81 Views)
Do I need to learn Dreamweaver working with ASP.NET
mail.mailmessage = "Gone crazy"   (56 Views)
hi ,I know it's a stupid subject name but couldn't come up with anything else.Sending mail with asp.net is discussed over the internet many times.I searched google, msdn and any forum but couldn't solve this one on my one.I've got the next code and it should work(or I'm missing something)mail.SmtpMail.SmtpServer = "localhost"dim MM as new mail.mailMessageMM.to = txtto.textMM.from = txtfrom.textMM.subject = txtsubject.textMM.body = txtbody.textMail.SmtpMail.Send(MM)This should work and it does work, because if I give a non-existing servername I get the error that there could not be a connection established with my serverIf I change the Relay of the server I get an error.If I execute the code above nothing happens. I don't get anymore.Anyone knows a sollution for this problemthnx in advance You can better regret that you have done something than regret the fact you done nothing
Datagrid Designed By The Devil: Deleting row generated from 2 tables   (190 Views)
I have a monster interface that I wrote around a SQL database designed by the Anti-Christ. It's a damn mess. 6 tables in all, not o bad, but they average at least 3-6 primary keys a piece.After figuring out that I can declare the primary keys for updates/deletes by lubing up with an array, I am still stuck with Satan's final torture.I have rows in a dataset that have delete options. The rows are the product of two tables. When I try to use the row.remove, .NET's satanic translator tells me that I can't delete a row generated from multiple tables. That's all neat and stuff, but in the mean time, my jerk of a boss needs me to get this done so he can take credit for my work.Code below. Any suggestion
refreshing iframe   (137 Views)
Does anyone know how to refresh an iframe in vb script.TIA. You are getting me back up to speed quick.
Web Control:TabStrip graphic images available?   (178 Views)
Where can I find some graphic images for my TABs in thw Microsoft TabStrip web controlTrying to spruce up my images.
Custom Server Control Question   (277 Views)
does anyone know how to make a section of output from a custom server control render only once regardless of how many controls of that type are on the formJames James Culshawjames@miniaturereview.co.ukhttp://www.miniaturereview.co.ukhttp://www.caninerescue.co.uk
Launching a PDF File Located on C: Drive From Code-Behind   (149 Views)
LAY OF THE LAND: I am generating PDF files on the fly using Crystal Reports. I am saving these files on my server's C: drive in a directory called MyPDFs (i.e., C:\MyPDFs). The security on this directory allows full control to only administrators and the ASPNET user account (trying to prevent web users from directly accessing the files). I have a Win2K server with IIS 5.0 and I am using ASP.Net. QUESTION: In the VB code behind my ASP.Net Web Form, I want to launch a PDF file located in the above mentioned directory ("C:\MyPDFs"). My VB code-behind assembles the proper PDF filename depending on what the user selects on the Web Form; however, for purposes of this question, assume the filename is MyFile.pdf ("C:\MyPDFs\MyFile.pdf"). What VB code do I use to launch this PDF file for the Web User Game Over, Man!
Another Datalist question!   (186 Views)
I want to display a size restricted window with no menu bar from a Hyperlink control in a Datalist. The URL needs to also pass the CompanyID. The only way i know to open a mini window is using Javascript, so I am trying to combine the call to the Javascript function with the Databinder of the CompanyID. The end URL should look like this:admin/Homepage.aspxcompanyid=1Here's the code:=========================================================== Joined ===========================================================Here's what i want to crowbar into it:======================================================================================================================Setting the NavigateURL to the Javascript on its own works, as does the DataBinder on its own, but i can't combine them without a syntax error. Is it possible or have i got the wrong approachcheers in advance,si
Reading JPEG images gives Out Of Memory error   (146 Views)
I've written some code so that I can select images from the server to display on my web site. It works fine in folders with around 100 images but in one folder which has 400 images I get an Out Of Memory Error. It only reads 144 images then gives the error. Can someone help me find out how I can fix this Should I be disposing of something in this loop Or is something else causing the error-------------------------Dim xdt2 As DataTable = myAdsFromXmlFile.Tables(0)Dim foundRows() As DataRowDim dr As DataRowDim myCounter As Integer = 0Dim myCurrentlyUsedImages As Integer = 0Dim lsErrorLocation As String = ""Try lsErrorLocation = "#3#" Label1.Text = ParentDirectory.GetFiles("*.jpg").Length.ToString For Each myfile In ParentDirectory.GetFiles("*.jpg") myCounter = myCounter + 1 dr = dt.NewRow() fullpath = "/photos/" & Session("sesPhotoCategory") & "/" & Session("sesFolder") & "/" & myfile.Name dr("image") = "/photos/" & Session("sesPhotoCategory") & "/" & Session("sesFolder") & "/" & myfile.Name dr("fname") = myfile.Name Dim currentImage As System.Drawing.Image = System.Drawing.Image.FromFile(myfile.FullName) Dim imgWidth As Integer = currentImage.Width Dim imgHeight As Integer = currentImage.Height currentImage.Dispose() dr("imgw") = imgWidth dr("imgh") = imgHeight dr("fsize") = myfile.Length / 1024 dr("fpath") = fullpath foundRows = xdt2.Select("ImageUrl='" + fullpath + "'") dr("chkd") = (foundRows.Length > 0) If foundRows.Length > 0 Then myCurrentlyUsedImages = myCurrentlyUsedImages + 1 End If dr("loop") = myCounter foundRows = xdt2.Select("ImageUrl='" + fullpath + "' AND Keyword='new'") dr("keywordnew") = (foundRows.Length > 0) dt.Rows.Add(dr) Next Catch Ex As Exception Label2.Text = "Error occurred: " & Session("sesPhotoCategory") & " page, loop " & myCounter & ", " & Ex.Message & " // " & vbNewLine & lsErrorLocationEnd Try