 |
 |
Index ‹ Web Programming ‹ IIS
|
- Previous
- 1
- ASP.Net >> Dataset help neededHi All,
Quick question. Can I use more than two tables as a source for a dataset? I
am trying to fill a dataadpater but when I include more than two tables, it
bombs out. Example:
________________________________________________________
This works
cmd = New OleDbCommand("SELECT FirstName, LastName " & _
"FROM (Event_Registration INNER JOIN Employees ON " & _
"Event_Registration.EmployeeID = Employees.EmployeeID) " & _
"WHERE EventID=?", cn)
Dim param As OleDbParameter
Dim ds As New DataSet
ds.DataSetName = "Registrations"
For Each param In p
cmd.Parameters.Add(param)
Next
Dim adptr As OleDbDataAdapter = New OleDbDataAdapter(cmd)
adptr.Fill(ds, "Event") This fails
_________________________________________________________________
This fails
cmd = New OleDbCommand("SELECT FirstName, LastName " & _
"FROM (Event_Registration INNER JOIN Employees ON " & _
"Event_Registration.EmployeeID = Employees.EmployeeID) " & _
"INNER JOIN [Names] ON Employees.NameID = Names.NameID WHERE EventID=?", cn)
Dim param As OleDbParameter
Dim ds As New DataSet
ds.DataSetName = "Registrations"
For Each param In p
cmd.Parameters.Add(param)
Next
Dim adptr As OleDbDataAdapter = New OleDbDataAdapter(cmd)
adptr.Fill(ds, "Event") '<~~~ fails here when join has more than two tables
_________________________________________________________________
Any suggestions? Am I doing something wrong? Thanks Everybody!!!
Chris
- 2
- ASP.Net >> Exporting HTML table to ExcelHi
How can I Export an HTML Table to excel?
My goal is a button, and when the user clicks this button a popup appears
asking the user to 'open' or 'save' the generated Excel file.
Actually I'm exporting by rendering my table to an htmlwriter and sending
this to excel. This is working nearly perfect. There's a problem with Excel's
auto-formatting of cells.
Excel is changing the content of my cells. '1.23' is getting 'Jan 23',
'true' gets 'TRUE' and so on. Always if Excel recognizes a format it knows,
it changes the content.
How can I prevent Excel from doing this?
I want my content 'as is'. Means it shouldn't be changed.
If I need to change my export (creating a excel workbook and sheet in
asp.net) I need at least the coding framework to get one cell filled, because
all my attempts in doing this went to an exception :(
Here's the actual piece of code I'm using:
Dim sw As System.IO.StringWriter = New System.IO.StringWriter
Dim hw As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(sw)
Dim str_temp As String = "attachment;filename=dtsReport_" &
System.DateTime.Today.Month & "-" & System.DateTime.Today.Day & "-" &
System.DateTime.Today.Year & ".xls"
Response.Clear()
Response.AddHeader("content-disposition", str_temp)
Response.ContentType = "application/ms-excel"
tbl_temp.RenderControl(hw)
Response.Write(sw.ToString())
Response.End()
- 3
- Frontpage Client >> Duplcate RecordsGuys, I have created a database of activities. In this database there is a
table called Activity that has and ID field. I have also created a table of
Contacts with a contact ID.
All the activities will have a contact person, even if they are unknown.
However, some of these activities can have multiple contacts (No more than
two.) So I created a third table that has the ID from the Activities table
and the ID from the contact table.
So I'm able to create a query based on this third table, and get all the
records that match. I can pull that data into FrontPage and print it out.
The problem is that I get two copies of the same activity, each with a
different contact.
What I would like to do is to be able to print one copy of the activity, but
have both contacts printed on the line. So basically I want to not print the
duplicate activity record if there are two contacts.
So any help would be greatly apprechiated.
- 4
- ASP.Net >> How to insert NULL to Database from VB.NETHow can i insert NULL below?
It says i can;t convert it to character!!
Dim MB As Char
If Request.Params("MB") = "True" Then
MB = "Y"
ElseIf Request.Params("MB") = "False" Then
MB = "N"
Else
MB = Convert.ToChar(DBNull.Value)
End If
*** Sent via Developersdex http://www.developersdex.com ***
- 5
- ASP.Net >> how can the website work fine in VS but not in deploy???Hi!
I've got a silverlight app that runs great from VS 2008 pro, but when
i deploy it, using vista sp1 iis7, i get the javascript alert:
<<"Sys.Preveiw.UI" is null or not an object>>
I feel like since i developed this in VS 2008 beta 2, that the
Microsoft.Web.Preview.dll is the wrong version, but i can't find a
new one anywhere
Any thoughts?
Thanks to all!
- 6
- ASP.Net >> OnServerChange Examples PleaseHello,
I am new to web development and I would like some examples in using
OnServerChange.
This is what is happening on the webpage. I have a list of names on the
page (names are inserted into a table using <input type="text").
Name: Here is name1
Name: name2
Name: name3
.
.
.
Name: nameN
When the page first loads I use an arrayList called dirtyArray to load
it up with another array containing a name and also an Integer (so the
first index has a name, the second has a default value of 0). Then I
fill the table up using a for loop:
<input type="text" id="txtName<%=i %>" onserverchange="setDirty"
size="30" maxlength="30"
value="<%=((ArrayList)dirtyArray.get_Item(i)).get_Item(0) %>"/>
What I want to do is, when a person changes a name, I want the
dirtyArray bit changed from 0 to 1, so upon hitting the submit button,
my page will run through the array and find which names are "dirty" by
looking for 1's.
Where my problem lies is getting the setDirty delegate working. It
seems onserverchange is not going to the setDirty method. I need some
good examples of using onserverchange. Any help would be greatly
appreciated.
Thanks,
Allan
- 7
- ASP.Net >> Grabbing content w/ a WebRequest from an Whidbey Forms Based AuthHi all--
I'm retrieving contents from my site using the retrieving images from the
database method listed here:
http://www.aspfree.com/c/a/ASP.NET/Retrieving-Images-from-a-Database--C---Part-II/
Basically, the page just returns the image into the page (also within the
same site) that's calling it.
However, because the entire site is under my Forms based auth (using
Whidbey), every time I try and request it, either directly in the web page,
or through a WebRequest, the site responds requiring authentication. I've
tried to do any of the following:
Impersonate the user requesting the image (since you already had to auth in
order to get to the site)
<code>
UriBuilder newURB = new UriBuilder("http://localhost:" + portNum +
Image1.ImageUrl);
WebRequest webReq = HttpWebRequest.Create(newURB.Uri);
webReq.ImpersonationLevel =
System.Security.Principal.TokenImpersonationLevel.Impersonation;
WebResponse webResponse = webReq.GetResponse();
</code>
Create a user and pass combo and building a webrequest
<code>
UriBuilder newURB = new UriBuilder("http://localhost:" + portNum +
Image1.ImageUrl);
newURB.UserName = "me";
newURB.Password = "12345";
WebRequest webReq = HttpWebRequest.Create(newURB.Uri);
WebResponse webResponse = webReq.GetResponse();
</code>
Turning off authentication to that page and directory:
<code>
<location path="mydir/e/">
<system.web>
<authorization>
<allow users="?" />
<allow users="*" />
</authorization>
</system.web>
</location>
</code>
I've read up and see there's a way to do it by getting the view state, but
that means every request for this image takes two requests... there's got to
be a better way! Thanks in advance!
- 8
- ASP.Net >> sessionDear All
I have this command in ASP.NET 2.0
session("test")="hello"
Iâ??m trying to retrive the seesion vale for onather web form using this command
Dim a as string=ctype(Session.item(â??testâ??),string)
But always giving me empty value .NO error message
I tried also
Dim a as string=session(â??testâ??) but same problem
Please can anyone help
- 9
- 10
- IIS >> IIS5.1 on Windows XP not processing ASP pagesHi there,
I have been trying to find a resolution for this MAJOR
CRITICAL error on my development server.
All html pages view fine and are executed fine, but when
an ASP file is processed it contains the following error:
Server Application Error
The server has encountered an error while loading an
application during the processing of your request. Please
refer to the event log for more detail information.
Please contact the server administrator for assistance.
When viewing the event log, 2 items are in place:
Source:DCOM
EventID:10004
DCOM got error "Overlapped I/O operation is in
progress. " and was unable to logon .\IWAM_CHRIS in order
to run the server:
{3D14228D-FBE1-11D0-995D-00C04FD919C1}
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Source:W3SVC
EventID:36
The server failed to load
application '/LM/W3SVC/1/ROOT'. The error was 'The
server process could not be started because the
configured identity is incorrect. Check the username and
password.
'.
For additional information specific to this message
please visit the Microsoft Online Support site located
at: http://www.microsoft.com/contentredirect.asp.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
I have tried to uninstall and install IIS, but without
any luck.
PLEASE HELP,
Chris Macko
- 11
- 12
- 13
- Frontpage Programming >> Hyperlink ButtonsIn Microsoft FrontPage 2002, under Page Properties>Background, you have an
option to "Enable hyperlink rollover effects."
Is it possible to use "rollover effect" with buttons that are hyperlinks?
If so, how?
- 14
- IIS >> MI5 Persecution: Troubling Censorship Issues 20/8/95 (3515)Fred Read (postmaster@foxhouse.demon.co.uk) wrote:
: He posts this drivel every week or so to a number of groups that
: I subscribe to and nothing seems to stop him. *ALL* of his posts
: are off topic and unwelcome to the groups he posts to.
: We have complained about him to his postmaster on at least four
: previous occasions and he still posts the same crap. As his SP
: seem unwilling, or unable, to do anything about him, we were
: windering if there was anything you could do?
If he is not actively using tactics to avoid or sabotage killfiles
(posting from various systems, forging, massive crossposting to create
cross-newsgroup flame wars) then it should be quite easy to killfile
him.
It does seem that the frequency and the size of his posts are
approaching net abuse. However, IMHO, they aren't quite there yet. If
his postmaster were to act in this instance, it would raise troubling
censorship issues.
--
Karen Lofstrom lofstrom@lava.net
---------------------------------------------------------------------
"Adventures for those of the inadmissable kind,
with no follow through."
--- a flaming bonzo beckwithian idiot
3515
- 15
- Frontpage Client >> No user feedback for postHi,
I am running FP 2003 and publishing my Web site to the IIS server in Win XP
Prof (same machine as FP).
When I post a module (e.g. that in Feedback.htm) all data get stored in the
proper file, but the user feedback page
'http://myserver/myweb/_vti_bin/shtml.dll/feedback.htm' is blank.
As a matter of fact there is no '_vti_bin' directory in my site.
I repeated the test on another computer running W2K prof and everything
worked fine.
Any suggestion?
-----------------------------------
Paolo Nunberg
Nucleosoft S.r.l.
paolo.nunberg@tin.it
|
| Author |
Message |
mcfip

|
Posted: Sun Mar 27 22:07:19 CST 2005 |
Top |
IIS >> Turning on security
Hello,
I have IIS 6 running on my laptop for developing ASP.NET pages. I need to
turn on security (NT Authentication) for one subdirectory and force an NT
login everytime I try to go to that web page. Can I do this on my laptop?
Thanks,
Web Programming234
|
| |
|
| |
 |
Jason

|
Posted: Sun Mar 27 22:07:19 CST 2005 |
Top |
IIS >> Turning on security
yes you can. edit the 'directory security' settings in IIS service manager
for the directory in question. Auth can be applied right down to individual
files if you want.
--
Jason Brown
Microsoft GTSC, IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steven K0" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Hello,
>
> I have IIS 6 running on my laptop for developing ASP.NET pages. I need to
> turn on security (NT Authentication) for one subdirectory and force an NT
> login everytime I try to go to that web page. Can I do this on my laptop?
> Thanks,
>
|
| |
|
| |
 |
Kristofer

|
Posted: Mon Mar 28 02:00:51 CST 2005 |
Top |
IIS >> Turning on security
Hi,
Open IIS Manager, right click the folder and click Properties.
Click on the Directory Security tab and click Edit for "Anonymous access
and authentication control".
Uncheck Anonymous Access, and use either Basic Authentication or
Integrated Windows Authentication, depending on your needs.
Make sure that the user account(s) has NTFS permissions on the
folder/files in question.
Good Luck!
--
Regards,
Kristofer Gafvert
www.gafvert.info - My Articles and help
www.ilopia.com
Steven K0 wrote:
> Hello,
>
> I have IIS 6 running on my laptop for developing ASP.NET pages. I need
to
> turn on security (NT Authentication) for one subdirectory and force an NT
> login everytime I try to go to that web page. Can I do this on my
laptop?
> Thanks,
|
| |
|
| |
 |
| |
 |
Index ‹ Web Programming ‹ IIS |
- Next
- 1
- ASP.Net >> Set a variableHi all,
My problem is to go back to desing view because I have bad format with
quotes in my onlclick.
onclick="ShowContent('btnNotes_<%#container.dataItem("ID")%>'); return
true;"
I want to set a value of a variable for <%#container.dataItem("ID")%> so I
can pass the value to the dynamic form field name.
I try this but it doesn't work.
<%Dim dataID
dataID = #container.dataItem("id") %>
Any ideas?
Tks
JFB
- 2
- ASP.Net >> Best way to use Global variableI have to keep a variable (integer) during the navigation of my asp.net
project (vb.net code behind).
So actually I use a module where I declare a global variable
Public MyGlobalVariable as integer
In all my form I refer to this variable with MyGlobalVariable .
Is this method the best way to use global variable ? Or is session
variable better ?
--
Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net
- 3
- 4
- ASP.Net >> ASP.NET 2.0 TreeView question...I'm using the 2.0 TreeView, and thus far have been able to get most
everything out of it I need (context menus on nodes, lazy loading, etc.).
However, there is a scenario in which I'm not sure what route to take. That
is:
1. Refreshing the tree from the client side (without a post back - this is
important) - better yet, refreshing a specific node and all of it's children.
I've looked at the TreeView.js file that is pulled out of the
System.Web.UI.WebControls assembly, but to no avail. Any ideas?????
- 5
- Frontpage Client >> FrontPage 2003 - Webbot QueryIs it possible to view all the webbot code that the FrontPage wizards
create.? I need to make a small change to the code in a form but I can't
locate the file the code is stored in. I know that it is possible to view
some code in FrontPage by clicking on the code tab but it does not seem to
list all the code created. Thanks for any replies.
- 6
- Frontpage Client >> In FP2002 Under WinXP Pro SP2, How Can I crearte Sub Webas?I'm not sure if this is exactly what I want to do or not. I have an
existing web site, basically 1 web that I maintain & publish with FP2002. I
would like to create either a second web (or sub web) that would not be
accessible from any point in my existing web site. I am not having any luck
finding out exactly how to create sub webs. So, I'd very much appreciate
the benefit of your thoughts and suggestions on this.
--
With kindest regards,
Dick Smith
- 7
- Frontpage Programming >> DIV Tags questionGo to "Page options", check the option "use DIV tags when positioning".
Create a new html page. Type in some text there, insert an ActiveX control
after the text and insert a drawing object from "drawing" toolbar and drop it
in the middle of the screen. Now, select the ActiveX control and set it to
use "Absolute Positioning". After setting absolute-positioning, if you try to
move the control everything moves with the control. Everything in the screen
comes under "div" tag. Why is this behavior and how to get rid of it?
- 8
- ASP.Net >> FormView programmatic binding for update, insertI prefer to have more control over the plumbing in my apps, but the
documentation for asp.net 2 assumes an "ObjectdataStore" approach.
I have the usual data access and logic layers. Retrieving both a list
and one record (for updates) is easy and working well. That's being
done by my setting the DataSource for the FormView and calling the Bind
method myself.
Now, for updates (and later, inserts). Can the Bind method work from
the form *to* the DataSource (not DataSourceID)? What if I'm writing
the Update command event handler? Or would I need to get the values
from the form (or the NewValues and OldValues collections), update the
BLL, then call the BLL's method that finally makes the DAL do the update
to the database server?
Thanks very much.
- 9
- IIS >> Deleting vs Stopping IIS WebsI have a server with 100+ web sites - many are being migrated over -
the content in fact already and the webs in IIS are just stopped. Is
there any performance gain by deleting them entirely vs leaving them
in a stopped state?
Thanks guys
- 10
- ASP.Net >> Web.sitemap and target of the URLI have a web.sitemap file that has the url title and description. I then
have this attac attached to a menu. I want some of my menu choices to open
up in a page in a new window ie _blank as target. How do I do this with a
web.sitemap file
- 11
- ASP.Net >> Saving files to network shares in ASP.net 2.0We have an ASP.NET 2.0 web application running on a Windows 2003 domain
controller. Part of that application needs to read and write files from and
to a network share ( living on a MAC Xserveraid) on the same network segment.
I mapped a drive on the server to that share. When mapping the drive, I
could enter access credentials for the shares (an account from the Mac side
that does not exist in the windows domain). Using Windows Explorer, I can now
read and write to the share just fine.
I then created a Virtual directory to point to that share. That worked fine.
Looking at the virtual directory in IIS, the file I put there using Windows
Explorer is visible, but I cannot do anything with it.
Using the web application I can neither read from nor write to that
directory. I parked a plain html file on it, but it will not display using
http://.../virtualD/file.htm - I get a 500 internal server error.
There is no ASP.NET account on that server. I created an Application Pool
specifically for that application it runs under the Network Service account.
There currently are only 1 user account (mine) and admin account, IUSR and
IWAM accounts on that server.
What's the trick to get to read and write to that share from the web app?
Thanks You!
--
MK
- 12
- 13
- IIS >> Problems opening Excel after upgrading from IIS 4 to IIS 5Hi,
After I've upgraded my server from IIS4 on NT4 to IIS 5 on W2000, my excel pages can no longer be viewed on Japanese WinXP IE6 with Jap Office 2000. There was no code changes of course and it works perfectly fine on English WinXP IE6 with Office 2000.
The excel file downloaded to the client is generated from ASP and also used to work on Jap WinXP IE6 before the IIS upgrade. Below is some sample code of how the excel file generated and thrown back to the client.
<% Response.ContentType = "application/x-msexcel" %>
<% Response.Buffer = True %>
...
<table border="1">
<% If Not Recordset1.EOF Then %>
<% If Recordset1__MMColParam1 <> "" Then %>
<tr>
<td colspan="8" bgcolor="#FFFFCC"><b><%=(Recordset1.Fields.Item("VCSSHORTNAME").Value)%></b></td>
</tr>
<% End If %>
...
Please advise on what could be the problem.
- 14
- Frontpage Client >> Camera_Toy_Videogame_Laptop_saleCamera_Toy_Videogame_Laptop_sale
http://shopforless.itgo.com
Camera Sale -Nikon , Canon, Minolta , Sony ,Xcam2 ,
Fujifilm ,
from $50 -up for the top brands
Toy Sale from monster trucks to game cubes starting at
$20 -$100
Pro active solution $20.00,and much more!
- 15
- ASP.Net >> Preprocessor directives must appear as the first non-whitespace character on a lineHello All ( I posted this on another group and was directed to post
this here so here goes)
I am writing a webpage in c+ .net and i have a repeater that displays
information, i want to add a statement that says
IF ("title" value from databinder == "Careers") output BLAH (show the
stuff in the databind)
ELSE
output some other BLAH (redirect to a different ASPX but show the
"title" field from the databinder...
but i keep getting the above (in the subject line) error and i can't
figure out why.. can anyone help me out...
(go to the --RIGHT HERE-- tag to see what i've done)..
Thanks in advance!!
<asp:Repeater id="rptSectionDetS" Visible="False" runat="server"
onItemDataBound="ShowSubSections">
<ItemTemplate>
<li <%#
validSec(DataBinder.Eval(Container.DataItem,
"sectionId").ToString()) ? "class='current'" : " class=''" %>><a
href="section<%# DataBinder.Eval(Container.DataItem, "layoutId")
%>.aspx?id=<%# DataBinder.Eval(Container.DataItem, "sectionId") %>"><%#
DataBinder.Eval(Container.DataItem, "title") %></a></li>
<asp:Repeater
id="rptSubSections" Visible='<%#
validSec(DataBinder.Eval(Container.DataItem, "sectionId").ToString())
%>' runat="server" onItemDataBound="ShowSubPages">
<ItemTemplate>
<li <%#
validSubSec(DataBinder.Eval(Container.DataItem,
"subsectionId").ToString()) ? "class='level1hl'" : " class='level1'"
%>>
--RIGHT
HERE-- <% if(# DataBinder.Eval(Container.DataItem,
"title").ToString() != "Careers"}{%>
<a href="subsection<%#
DataBinder.Eval(Container.DataItem,
"layoutId") %>.aspx?id=<%# DataBinder.Eval(Container.DataItem,
"subsectionId") %>"><%# DataBinder.Eval(Container.DataItem, "title")
%></a></li>
<%}%> -- ADD ELSE EVENTUALLY--
<asp:Repeater id="rptSubPages" Visible='<%#
(validSubSec(DataBinder.Eval(Container.DataItem,
"subsectionId").ToString())) %>' runat="server">
<ItemTemplate>
<li class="level2"><a href="subpage<%#
DataBinder.Eval(Container.DataItem, "layoutId") %>.aspx?id=<%#
DataBinder.Eval(Container.DataItem, "subpageid") %>"><%#
DataBinder.Eval(Container.DataItem, "title") %></a></li>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
|
|
|