| How to create web page with spreadsheet like functionality? |
|
 |
Index ‹ dotnet-framework-aspnet
|
- Previous
- 2
- Adding Cash Register support in ASP.NET applicationHello there,
I am a leader of a team, developing business application based on the
ASP.NET platform. Now we need to add cash register support to the
application and it seems to be a bit of a problem. In general communication
with the cash register consists of two steps:
1 - Creation of a text file, describing the items, quantities and prices;
2 - Invoke cash register's driver (which is an exe file in most cases),
passing the text file and some additional parameters (com port, speed, etc.)
The main problem is that the cash register is managed from the client
computer.
Currently we came up to three approaches to the task:
- a link pointing to exe file - an exe file is downloaded and it operates
the driver
- a resident program on the client computer listening on a port - the server
connects to it and operates the driver
- an ActiveX Object - the driver is operated by client script from the
internet browser
Each method has advantages and disadvantages. I would like to know if
someone had some experiance of similar matter and I would appreciate any
kind of help or comment
Thank you in advance
- 8
- XSLT and trusted filesHere is the deal. We have an ASP.NET page which does an XSLT
transform. Both the XSL and the XML come off a unc path on another
server. All annonymous accaess has been permissioned accordingly. In
addition aspnet_setreg.exe has been downloaded and been run to give the
applications the appropriate permissions.
I feel it has something to do with trusted sites. If I change the code
to pass evidence to the XslTransform load (the good code) it all works
jim dandy and such. Unfortunately, I am unable to modify the code in
production and need to solve this at a machine.config / web.congig / OS
level. Any help would be greatly appreciated.
Thank you
Todd
***** BAD CODE *****
*************************
XslTransform xslt = new XslTransform();
xslt.Load(uncPath);
xslt.Transform(doc, xslArg, tw, null);
string result = sb.ToString();
Response.Write(result);
***** GOOD CODE *****
*************************
XmlDocument d = new XmlDocument() ;
d.Load(uncPath)
XslTransform xslt = new XslTransform();
xslt.Load((IXPathNavigable)d, null, this.GetType().Assembly.Evidence);
xslt.Transform(doc, xslArg, tw, null);
string result = sb.ToString();
Response.Write(result);
- 8
- visibly disable img linkHi;
We have image links via ButtonField and when it is disabled, the link does
not work but the image looks the same. Any suggestions to make the image look
disabled?
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
- 8
- refomratting asp code in visual web developer I am trying to reformat tags like the the "<asp:label" tag as a test using the settings of line breaks of :
"before opening, within and after closing"
but it doesn't result in attributes on new lines.
do you know which combination of settings will produce line breaks on attributes so code will look like below after formatting ?
<asp:Label
id="lblProductName"
Text="Product Name:"
AssociatedControlID="txtProductName"
Runat="server" />
- 12
- Data in Custom Web ControlDoes anyone know how I can pass data to a Custom Web Control?
I have been able to pass a DataSet as an object but I can't use it.
DataSets don't seem to be available the namespaces will not load.
Thanks for any help.
Brian K. Williams
- 12
- Find the Control Event Before Page_Loadi am creating dynamic controls in my application.when i click radio button
first the page load is execute and then radio selected index event is
excuted.is there any way to find radio button click in page_Load.
- 12
- website screen showI am looking for a way to catch a web site screen show by code. Just like
the site of alexa.com which offers a small web site screen image.
Any suggestion how can I do this?
regards,
Guoqi Zheng
http://www.ureader.com
- 12
- wap emulatorHi, how I can built a wap emulator using a aspnet mobile controls ,do you
know a documentations site that help me please ! sorry for my english !
THANKS DONATO
- 13
- Build N-deep web sites with this control very quickly. I have created a System.Web.UI.Control that you can build your N- deep
pages very quickly. N-deep means that, you can add unlimited pages,
unlimited sub pages, unlimited sub sub pages... to your web site.
This is the first time that i am publishing this control to the web.
After receiving feedbacks from you, i will also add it's announcement to the
other news groups and forums.
http://www.tezduyar.com/umut/webtemplate.aspx this is the home page for
my control. This web site is also done with my control. From the web page,
you can get the latest version and sample application.
I wish to receive lots of comments and suggestions about it. Have a good
work :) Thanks to all testers.
- 13
- multitable datagrid updateI have a datagrid which has a dataset as it's datasource. The dataset
contains a join of a few tables.
In only want to update one of the tables in this join.
how can i do this?
ch Jim
- 13
- Accepting certain tags in a textboxASP.NET will generate a failure/security warning, if you enter html tags into
a textbox (of course, the failure will come after the postback).
That's nice and useful, and I know you can turn it off completely, but is it
possible to turn it off just for certain tags, not all tags?
- 13
- How to avoid repeating codeHi all,
I have a table called Category and it has only two fields: CategoryID
and CategoryName. I want user to be able to enter 10 categories at one
page. So I what I do right now is to place 10 text input boxs on the
page with name txt1, txt2, txt3, etc. After the user submit. I will
check to see if each txt box is empty and insert into table if not.
The problem is that I need duplicate the code for each text box. I am
wondering if there is a way to just loop through those text boxes and do
the checking and inserting inside the loop. That would really cut down
the amount of codes.
I am new to asp.net, so please help :)
Thanks in advance,
Brian
- 14
- asp.net + unmanaged dll security issuesHi,
I'm developing an ASP.NET application. I imported a C++ dll into the C# code.
When I tried to access a function in that dll, application threw an exception
"System.Runtime.InteropServices.SEHException:External component has thrown
an exception". I debugged the unmanaged C++ code & found that the code that
generated this exception is
CDaoDatabase db;
db.open("C:\\VM.mdb") // this is the code that generated exception
I tried using try catch blocks
but the control does'nt come to catch block
How do i determine the exception?
The same dll function works fine if the dll is impoted in a Windows
application.
Is there any security issues in Web application?
Thanks in advance
Priya
- 15
- C# / ASP.Net code to allow web page visitors to download files from web serverHi, I'm using webclient to enable download of files.
However, files get copied to the server rather than the
client machine. What could be the problem.
Here is the sample that I've used:
WebClient myWebClient = new WebClient();
myWebClient.DownloadFile
("http://www.myweb.com/testfile.txt" ,"c:/test.txt");
The problem is that the test.txt gets copied to the C:\
drive of the server rather than the client machine.
- 15
- Debug.Assert( False, "Why wont I display ??")Debug.Assert( False, "Why wont I display ??")
I am trying to use this in my code but it wont display. The app is running
on my local machine and the above code under a button click event.
What am I missing ?
Cheers mr N . . .
|
| Author |
Message |
Tom

|
Posted: 2004-9-24 22:42:55 |
Top |
dotnet-framework-aspnet, How to create web page with spreadsheet like functionality?
Hello,
I'm looking for a tool that would allow me to create a web page with the
spreadsheet like functionality. Basically, I want to be able to type in a
number in the cell and have all totals being calculated automatically
without having a page refreshed (or a trip to the server). That would be
possible to do with MS Excel web plug-in but I don't want to use plug-ins. I
want users to just access the page and don't worry if they have MS Excel or
MS plug-ins installed.
Is there a solution that would accomplish that? I can be written in any
language like ASP, JSP, DHTML, PYTHON or PHP or a third party tool. I really
don't care. I just wont to create a page with the spreadsheet like
functionality.
Any help is greatly appreciated,
Tom
|
| |
|
| |
 |
Tom

|
Posted: 2004-9-24 22:48:00 |
Top |
dotnet-framework-aspnet >> How to create web page with spreadsheet like functionality?
Hello,
I'm looking for a tool that would allow me to create a web page with the
spreadsheet like functionality. Basically, I want to be able to type in a
number in the cell and have all totals being calculated automatically
without having a page refreshed (or a trip to the server). That would be
possible to do with MS Excel web plug-in but I don't want to use plug-ins. I
want users to just access the page and don't worry if they have MS Excel or
MS plug-ins installed.
Is there a solution that would accomplish that? I can be written in any
language like ASP, JSP, DHTML, PYTHON or PHP or a third party tool. I really
don't care. I just wont to create a page with the spreadsheet like
functionality.
Any help is greatly appreciated,
Tom
|
| |
|
| |
 |
Tom

|
Posted: 2004-9-24 23:20:00 |
Top |
dotnet-framework-aspnet >> How to create web page with spreadsheet like functionality?
Hello,
I'm looking for a tool that would allow me to create a web page with the
spreadsheet like functionality. Basically, I want to be able to type in a
number in the cell and have all totals being calculated automatically
without having a page refreshed (or a trip to the server). That would be
possible to do with MS Excel web plug-in but I don't want to use plug-ins. I
want users to just access the page and don't worry if they have MS Excel or
MS plug-ins installed.
Is there a solution that would accomplish that? I can be written in any
language like ASP, JSP, DHTML, PYTHON or PHP or a third party tool. I really
don't care. I just wont to create a page with the spreadsheet like
functionality.
Any help is greatly appreciated,
Tom
|
| |
|
| |
 |
Peter Rilling

|
Posted: 2004-9-24 23:28:00 |
Top |
dotnet-framework-aspnet >> How to create web page with spreadsheet like functionality?
You would need to use a client scripting language like JavaScript.
"Tom" <email***@***.com> wrote in message
news:ctW4d.28651$email***@***.com...
> Hello,
>
> I'm looking for a tool that would allow me to create a web page with the
> spreadsheet like functionality. Basically, I want to be able to type in a
> number in the cell and have all totals being calculated automatically
> without having a page refreshed (or a trip to the server). That would be
> possible to do with MS Excel web plug-in but I don't want to use plug-ins.
I
> want users to just access the page and don't worry if they have MS Excel
or
> MS plug-ins installed.
> Is there a solution that would accomplish that? I can be written in any
> language like ASP, JSP, DHTML, PYTHON or PHP or a third party tool. I
really
> don't care. I just wont to create a page with the spreadsheet like
> functionality.
>
> Any help is greatly appreciated,
> Tom
>
>
|
| |
|
| |
 |
Hans Kesting

|
Posted: 2004-9-24 23:35:00 |
Top |
dotnet-framework-aspnet >> How to create web page with spreadsheet like functionality?
Tom wrote:
> Hello,
>
> I'm looking for a tool that would allow me to create a web page with
> the spreadsheet like functionality. Basically, I want to be able to
> type in a number in the cell and have all totals being calculated
> automatically without having a page refreshed (or a trip to the
> server). That would be possible to do with MS Excel web plug-in but I
> don't want to use plug-ins. I want users to just access the page and
> don't worry if they have MS Excel or MS plug-ins installed.
> Is there a solution that would accomplish that? I can be written in
> any language like ASP, JSP, DHTML, PYTHON or PHP or a third party
> tool. I really don't care. I just wont to create a page with the
> spreadsheet like functionality.
>
> Any help is greatly appreciated,
> Tom
Apart from DHTML all languages you specified are *server side* languages,
and you didn't want server side functionality....
If you don't want roundtrips, then you have to work with client-side
javascript. (or vbscript, if you want to limit your audience to IE on
windows)
Hans Kesting
|
| |
|
| |
 |
Bob Barrows [MVP]

|
Posted: 2004-9-24 23:44:00 |
Top |
dotnet-framework-aspnet >> How to create web page with spreadsheet like functionality?
Tom wrote:
> Hello,
>
> I'm looking for a tool that would allow me to create a web page with
> the spreadsheet like functionality. Basically, I want to be able to
> type in a number in the cell and have all totals being calculated
> automatically without having a page refreshed (or a trip to the
> server). That would be possible to do with MS Excel web plug-in but I
> don't want to use plug-ins. I want users to just access the page and
> don't worry if they have MS Excel or MS plug-ins installed.
> Is there a solution that would accomplish that? I can be written in
> any language like ASP, JSP, DHTML, PYTHON or PHP or a third party
> tool. I really don't care. I just wont to create a page with the
> spreadsheet like functionality.
>
> Any help is greatly appreciated,
> Tom
There is no ASP solution for this. You will need to use DHTML in client-side
code to do this. See a DHTML group or one of the scripting groups. You may
want to start at the DHTML documentation at msdn.microsoft.com/library. Just
drill down in the Web development node in the TOC.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
|
| |
|
| |
 |
Curt_C [MVP]

|
Posted: 2004-9-24 23:47:00 |
Top |
dotnet-framework-aspnet >> How to create web page with spreadsheet like functionality?
first off, decide on it you want postbacks. If you dont want a round trip on
EVERY cell then you have to use a CLIENTSIDE language (javascript) to do the
work for you.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Tom" <email***@***.com> wrote in message
news:5XW4d.28680$email***@***.com...
> Hello,
>
> I'm looking for a tool that would allow me to create a web page with the
> spreadsheet like functionality. Basically, I want to be able to type in a
> number in the cell and have all totals being calculated automatically
> without having a page refreshed (or a trip to the server). That would be
> possible to do with MS Excel web plug-in but I don't want to use plug-ins.
> I
> want users to just access the page and don't worry if they have MS Excel
> or
> MS plug-ins installed.
> Is there a solution that would accomplish that? I can be written in any
> language like ASP, JSP, DHTML, PYTHON or PHP or a third party tool. I
> really
> don't care. I just wont to create a page with the spreadsheet like
> functionality.
>
> Any help is greatly appreciated,
> Tom
>
>
|
| |
|
| |
 |
Ken Cox [Microsoft MVP]

|
Posted: 2004-9-27 0:24:00 |
Top |
dotnet-framework-aspnet >> How to create web page with spreadsheet like functionality?
"MayerSoft.Web.Controls.Spreadsheet is an ASP.NET server control used to
render a spreadsheet.
Cells may contain text, labels, dates, numbers or formulas. "
http://www.asp.net/ControlGallery/ControlDetail.aspx?Control=2216&tabindex=2
"Tom" <email***@***.com> wrote in message
news:VnW4d.28549$email***@***.com...
> Hello,
>
> I'm looking for a tool that would allow me to create a web page with the
> spreadsheet like functionality. Basically, I want to be able to type in a
> number in the cell and have all totals being calculated automatically
> without having a page refreshed (or a trip to the server). That would be
> possible to do with MS Excel web plug-in but I don't want to use plug-ins.
> I
> want users to just access the page and don't worry if they have MS Excel
> or
> MS plug-ins installed.
> Is there a solution that would accomplish that? I can be written in any
> language like ASP, JSP, DHTML, PYTHON or PHP or a third party tool. I
> really
> don't care. I just wont to create a page with the spreadsheet like
> functionality.
>
> Any help is greatly appreciated,
> Tom
>
>
|
| |
|
| |
 |
| |
 |
Index ‹ dotnet-framework-aspnet |
- Next
- 1
- 2
- Problem in invoking WebMethod at client sideThis is a multi-part message in MIME format.
Hi:
I had the following client proxy code autogenerated:
Code I:
[System.Web.Services.Protocols.SoapRpcMethodAttribute("http://tempuri.org/ProcessCondensateFile", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/")]
public bool ProcessCondensateFile(CondensateFileContainer condensateFileContainer) {
object[] results = this.Invoke("ProcessCondensateFile", new object[] {
condensateFileContainer});
return ((bool)(results[0]));
}
While debugging, I would loose control at this.Invoke(). i.e. The app never reached the return statement nor did it time-out (the default is 100). Not sure of what is happening, I overrode GetWebRequest() method of the client proxy to do the following:
Code II:
protected override WebRequest GetWebRequest(Uri uri)
{
HttpWebRequest webRequest = null;
try
{
webRequest = (HttpWebRequest) DoWorkHandler(uri);
}
catch (Exception e)
{
string msg = e.Message;
}
return webRequest;
}
private WebRequest DoWorkHandler(Uri uri)
{
return base.GetWebRequest(uri);
}
Sure enough, I lost control in DoWorkHandler at the return statement. Armed with this information, I tried to call the DoWorkHandler asynchronously like below with my own timeout since the timeout of the webservice client proxy never worked at the first place:
Code III:
protected override WebRequest GetWebRequest(Uri uri)
{
HttpWebRequest webRequest = null;
try
{
WorkDelegate d = new WorkDelegate(DoWorkHandler);
IAsyncResult res = d.BeginInvoke(uri,null,null);
if(res.IsCompleted == false)
{
res.AsyncWaitHandle.WaitOne(10000,false);
if(res.IsCompleted == false)
throw new ApplicationException("Timeout");
}
webRequest = (HttpWebRequest) d.EndInvoke((AsyncResult)res);
}
catch (Exception e)
{
string msg = e.Message;
}
return webRequest;
}
Surprisingly this works. i.e. The request is passed to the service and I am getting a response back (no timeouts either). I would rather like to have Code I as opposed to Code III. Can somebody enlighten me as to why is this happening? I am working on a Windows XP workstation with Visual Studio 2003. My client and service are on the same box. I've at least 20 other services / clients running under same box using the same kind of interface without any hiccup.
Thanks,
Ram
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial size=2>Hi:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I had the following client proxy code
autogenerated:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><STRONG>Code I:</STRONG></FONT></DIV><FONT
size=2><FONT size=2>
<DIV><FONT
face="Courier New">[System.Web.Services.Protocols.SoapRpcMethodAttribute("http://tempuri.org/ProcessCondensateFile",
RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/")]</FONT></DIV>
<DIV></FONT><FONT face="Courier New"><FONT color=#0000ff
size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff
size=2>bool</FONT></FONT><FONT size=2><FONT face="Courier New">
ProcessCondensateFile(CondensateFileContainer condensateFileContainer)
{</FONT></DIV>
<DIV></FONT><FONT face="Courier New"><FONT color=#0000ff
size=2> object</FONT><FONT size=2>[] results = </FONT><FONT
color=#0000ff size=2>this</FONT><FONT size=2>.Invoke("ProcessCondensateFile",
</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT
color=#0000ff size=2>object</FONT></FONT><FONT size=2><FONT
face="Courier New">[] {</FONT></DIV>
<DIV><FONT face="Courier New">
condensateFileContainer});</FONT></DIV>
<DIV></FONT><FONT face="Courier New"><FONT color=#0000ff
size=2> return</FONT><FONT size=2> ((</FONT><FONT
color=#0000ff size=2>bool</FONT></FONT><FONT size=2><FONT
face="Courier New">)(results[0]));</FONT></DIV>
<DIV><FONT face="Courier New">}</FONT></DIV>
<P></FONT></FONT><FONT face=Arial size=2>While debugging, I would loose control
at <STRONG>this.Invoke().</STRONG> i.e. <STRONG>The app never reached the return
statement nor did it time-out (the default is 100)</STRONG>. Not sure of what is
happening, I overrode GetWebRequest() method of the client proxy to do the
following: </FONT></P>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2><STRONG>Code
II:</STRONG></FONT></DIV></FONT></DIV><FONT face=Arial size=2><FONT size=2>
<DIV></FONT><FONT face="Courier New"><FONT color=#0000ff
size=2>protected</FONT><FONT size=2> </FONT><FONT color=#0000ff
size=2>override</FONT></FONT><FONT size=2><FONT face="Courier New"> WebRequest
GetWebRequest(Uri uri)</FONT></DIV>
<DIV><FONT face="Courier New">{</FONT></DIV>
<DIV><FONT face="Courier New"> HttpWebRequest webRequest =
</FONT></FONT><FONT face="Courier New" color=#0000ff size=2>null</FONT><FONT
size=2><FONT face="Courier New">;</FONT></DIV>
<DIV></FONT><FONT face="Courier New" color=#0000ff size=2>
try</FONT><FONT size=2><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New"> {</FONT></DIV></FONT><FONT
face="Courier New" size=2>
<DIV> webRequest = (HttpWebRequest)
DoWorkHandler(uri);</DIV></FONT><FONT size=2>
<DIV><FONT face="Courier New"> }</FONT></DIV>
<DIV></FONT><FONT face="Courier New" color=#0000ff size=2>
catch</FONT><FONT size=2><FONT face="Courier New"> (Exception e) </FONT></DIV>
<DIV><FONT face="Courier New"> {</FONT></DIV>
<DIV></FONT><FONT face="Courier New" color=#0000ff size=2>
string</FONT><FONT size=2><FONT face="Courier New"> msg =
e.Message;</FONT></DIV></FONT><FONT size=2>
<DIV><FONT face="Courier New"> }</FONT></DIV>
<DIV></FONT><FONT face="Courier New" color=#0000ff size=2>
return</FONT><FONT size=2><FONT face="Courier New"> webRequest;</FONT></DIV>
<DIV><FONT face="Courier New">}</FONT></DIV><FONT face="Courier New"><FONT
size=2>
<DIV></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> WebRequest
DoWorkHandler(Uri uri)</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#0000ff size=2> return</FONT><FONT
size=2> </FONT><FONT color=#0000ff size=2>base</FONT><FONT
size=2>.GetWebRequest(uri);</DIV>
<DIV>}</DIV>
<P><FONT face=Arial>Sure enough, I lost control in
<STRONG>DoWorkHandler</STRONG> at the <STRONG>return</STRONG> statement. Armed
with this information, I tried to call the DoWorkHandler asynchronously like
below with my own timeout since the timeout of the webservice client proxy never
worked at the first place:</FONT></P>
<DIV><FONT face=Arial size=2><STRONG>Code III:</STRONG></FONT></DIV>
<P><FONT color=#0000ff size=2>protected</FONT><FONT size=2> </FONT><FONT
color=#0000ff size=2>override</FONT><FONT size=2> WebRequest GetWebRequest(Uri
uri)</P>
<DIV>{</DIV>
<DIV> HttpWebRequest webRequest = </FONT><FONT color=#0000ff
size=2>null</FONT><FONT size=2>;</DIV>
<DIV></FONT><FONT color=#0000ff size=2> try</FONT><FONT
size=2> </DIV>
<DIV> {</DIV>
<DIV> WorkDelegate d = </FONT><FONT
color=#0000ff size=2>new</FONT><FONT size=2> WorkDelegate(DoWorkHandler);</DIV>
<DIV> IAsyncResult res =
d.BeginInvoke(uri,</FONT><FONT color=#0000ff size=2>null</FONT><FONT
size=2>,</FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2>);</DIV>
<DIV></FONT><FONT color=#0000ff size=2>
if</FONT><FONT size=2>(res.IsCompleted == </FONT><FONT color=#0000ff
size=2>false</FONT><FONT size=2>)</DIV>
<DIV> {</DIV>
<DIV>
res.AsyncWaitHandle.WaitOne(10000,</FONT><FONT color=#0000ff
size=2>false</FONT><FONT size=2>);</DIV>
<DIV></FONT><FONT color=#0000ff size=2>
if</FONT><FONT size=2>(res.IsCompleted == </FONT><FONT
color=#0000ff size=2>false</FONT><FONT size=2>)</DIV>
<DIV></FONT><FONT color=#0000ff size=2>
throw</FONT><FONT size=2> </FONT><FONT
color=#0000ff size=2>new</FONT><FONT size=2>
ApplicationException("Timeout");</DIV>
<DIV> }</DIV>
<DIV> webRequest = (HttpWebRequest)
d.EndInvoke((AsyncResult)res);</DIV></FONT><FONT size=2>
<DIV> }</DIV>
<DIV></FONT><FONT color=#0000ff size=2> catch</FONT><FONT
size=2> (Exception e) </DIV>
<DIV> {</DIV>
<DIV></FONT><FONT color=#0000ff size=2>
string</FONT><FONT size=2> msg = e.Message;</DIV></FONT><FONT size=2>
<DIV> }</DIV>
<DIV></FONT><FONT color=#0000ff size=2> return</FONT><FONT
size=2> webRequest;</DIV>
<DIV>}</DIV>
<P><FONT face=Arial>Surprisingly this works. i.e. The request is passed to the
service and I am getting a response back (no timeouts either). I would rather
like to have Code I as opposed to Code III. <STRONG>Can somebody enlighten me as
to why is this happening?</STRONG> I am working on a Windows XP workstation with
Visual Studio 2003. My client and service are on the same box. I've at least 20
other services / clients running under same box using the same kind of interface
without any hiccup.</FONT></P>
<P><FONT face=Arial></FONT> </P>
<P><FONT face=Arial>Thanks,</FONT></P>
<P><FONT
face=Arial>Ram</FONT></P></FONT></FONT></FONT></FONT></FONT></BODY></HTML>
- 3
- ASP NET Worker Process DefinitionCan anyone explain to me what actually Worker Process is
generally and What actually ASP.NET Worker Process is
specifically ? I have been looking through the internet,
but many are just talking about how to use it, but not
explaining what it is . Thanks.
- 4
- uploading and saving BLOB to database?Hi
I want to upload a general BLOB (jpg, doc, pdf etc) to the database.
My code for this is at the moment something like
<<
if (
(fileDischargeFile.PostedFile != null) // there is an uplaoded file
& (fileDischargeFile.PostedFile.ContentLength !=0 ) ) // of non-zero
length
{
//Get the posted file
System.IO.Stream fileDataStream =
fileDischargeFile.PostedFile.InputStream;
//Get length of file
int fileLength = fileDischargeFile.PostedFile.ContentLength;
//Create a byte array with file length
byte[] fileData = new byte[fileLength];
//Read the stream into the byte array
fileDataStream.Read(fileData,0,fileLength);
lblUploadMessage.Text = fileData.Length.ToString(); // check we got
it - testing only - (*)
// load up the data reader so we can write the file into the BLOB
field:
nxCommand_UpdateDischargeFile.Parameters["SessionID"].Value =
Request.QueryString["SessionDataID"];
nxCommand_UpdateDischargeFile.Parameters["DischargeSummaryAmendment"].Value
= fileData;
nxConnection.Open();
nxCommand_UpdateDischargeFile.ExecuteNonQuery();
nxConnection.Close();
>>
What happens is that it all appears to work, it tells me it's uploaded file
of say 25,321 bytes (in line *, above), but when I have a look at the BLOB
in the database there appears to be nothing there.
Is the above correct, andd is it the best way to generally load a BLOB into
the database?
Thanks!
Lauchlan M
- 5
- ASP .NET with Active DirectoryHi,
I'm new with .net technology, currently I'm developing an application
by using ASP .net, I want to link it with the Active Directory on the
Domain Controller. I know that I should add Directory Services as a
reference, but my problem is that I don't know how to start
translating the application scenario into code, first I want to do a
logon page, the application should check the user name and password
and make sure the person is manager to let him logon the application,
then it should display the employees' names that r working in the
manager department (each manager with different stuff).. can anybody
give me a hint to start writing my application ?
:roll:
waiting your reply, Thanks alot :)
Posted at: http://www.groupsrv.com
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
- 6
- Change repeater name patternWhen I bind a server control to a repeater it renders one copy of this
control for each item in the datasource collection.
By doing this it changes the name of the dynamically created controls, to
ensure each name is unique.
My problem is that the repeater control has a proprietary pattern to
gererate this names and I'd like to use a pattern that's standard for my
applications (and to my client-side scripts).
I got to partially change the name generation by creating a control that
inherits from the repeater and overrinding the UniqueID property and the
InitializeItem method. But it only changes the contents of the name
generation, not the pattern itself.
Here is an example:
Putting a ASP:LABEL control into the repeater's ItemTemplate section and
naming it "lblREP", it renders like the following:
<span id="repFM__ctl2_lblREP">Test REP Label</span>
<span id="repFM__ctl3_lblREP">Test REP Label</span>
...
This name pattern has 3 basic sections: The name of the repeater, the
constant "ctl" followed by an enumerator and the control's original name. By
doing like I told, I can only change the contents of each one of this
sections, but not change the pattern
I would like it to render like this:
<span id="lblREP2">Test REP Label</span>
<span id="lblREP3">Test REP Label</span>
Anyone has any ideia of what I need to do to get this kind of result?
Thanks in advance!
- 7
- error:Input string was not in a correct format.trying to pass a string:
409-56-7008
from:
<a href='<%# String.Format( "details.aspx?id={0}", Container.DataItem(
"au_id" ) ) %>'><%# Container.DataItem( "au_lname" ) %></a>
to:
ID = Int32.Parse( Request.QueryString( "id" ) )
error msg:
http://127.0.0.1/NorthCoastLab/Reports/details.aspx?id=409-56-7008
what's wrong ?????
- 8
- Datagrid Inserts and PagingI have a grid that allows inserts and has paging. The inserts work fine
when the new item is on the 1st page. The blank line is inserted and I'm in
edit mode. If the new item is on a page other than the 1st, a new blank
record is added and I have to manually go to that page and edit the item.
How can I determine that the new item is on a new page and go directly to
that page in edit mode?
I'm using VB and the insert does a .newrow.
- 9
- How do I insert a record using Wizard?Using VSE 2008 and VB, I created a page with a Wizard on it and put in all
the steps with the required informaiton. But, I can't figure out how to
make the "Finish" button in the Wizard insert the record. Can someine show
me how to do this? Below is my aspx page. Thank you!
<%@ Page Language="VB" MasterPageFile="~/site.master"
AutoEventWireup="false"
CodeFile="ProducerAdd.aspx.vb" Inherits="Admin_ProducerAdd"
Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent"
runat="Server">
<br />
<asp:Wizard ID="WizardAddProducer" runat="server" ActiveStepIndex="8"
CancelDestinationPageUrl="~/Admin/ProducerAdd.aspx"
DisplayCancelButton="True"
FinishDestinationPageUrl="~/Admin/Producer.aspx">
<WizardSteps>
<asp:WizardStep runat="server" Title="Local">
Country:
<asp:DropDownList ID="DLCountry" runat="server"
AutoPostBack="True" DataSourceID="sqlCountry"
DataTextField="CountryName" DataValueField="CountryID">
</asp:DropDownList>
<br />
State:
<asp:DropDownList ID="DLState" runat="server"
AutoPostBack="True" DataSourceID="sqlStates"
DataTextField="StateName" DataValueField="StateID">
</asp:DropDownList>
<br />
City:
<asp:DropDownList ID="DLCity" runat="server"
DataSourceID="sqlCity" DataTextField="CityName"
DataValueField="CityID">
</asp:DropDownList>
<br />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Region">
Procucer Type:
<asp:DropDownList ID="DropDownListType" runat="server"
DataSourceID="sqlProducerType"
DataTextField="TypeName" DataValueField="TypeID">
</asp:DropDownList>
<br />
Region:
<asp:DropDownList ID="DropDownListRegion" runat="server"
AutoPostBack="True" DataSourceID="sqlRegion"
DataTextField="RegionName" DataValueField="RegionID">
</asp:DropDownList>
<br />
Sub-Region:
<asp:DropDownList ID="DropDownListSubRegion" runat="server"
DataSourceID="sqlSubRegion"
DataTextField="SubRegionName"
DataValueField="SubRegionID">
</asp:DropDownList>
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Name & Address">
ProducerName:
<asp:TextBox ID="ProducerNameTextBox" runat="server"
Text='<%# Bind("ProducerName") %>' />
<br />
ProducerStreetAddress:
<asp:TextBox ID="ProducerStreetAddressTextBox"
runat="server" Text='<%# Bind("ProducerStreetAddress") %>' />
<br />
ProducerStreetAddress2:
<asp:TextBox ID="ProducerStreetAddress2TextBox"
runat="server" Text='<%# Bind("ProducerStreetAddress2") %>' />
<br />
ProducerZipCode:
<asp:TextBox ID="ProducerZipCodeTextBox" runat="server"
Text='<%# Bind("ProducerZipCode") %>' />
</asp:WizardStep>
<asp:WizardStep ID="WSContact" runat="server" Title="Contact
Info">
ProducerPhone:
<asp:TextBox ID="ProducerPhoneTextBox" runat="server"
Text='<%# Bind("ProducerPhone") %>' />
<br />
ProducerFax:
<asp:TextBox ID="ProducerFaxTextBox" runat="server"
Text='<%# Bind("ProducerFax") %>' />
<br />
ProducerEmail:
<asp:TextBox ID="ProducerEmailTextBox" runat="server"
Text='<%# Bind("ProducerEmail") %>' />
<br />
ProducerURL:
<asp:TextBox ID="ProducerURLTextBox" runat="server"
Text='<%# Bind("ProducerURL") %>' />
<br />
ProducerContactName:
<asp:TextBox ID="ProducerContactNameTextBox" runat="server"
Text='<%# Bind("ProducerContactName") %>' />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Biography">
Year Founded:<asp:DropDownList ID="DropDownList1"
runat="server"
DataSourceID="sqlYears" DataTextField="Year"
DataValueField="YearID">
</asp:DropDownList>
<br />
ProducerInfo:<br />
<asp:TextBox ID="ProducerInfoTextBox" runat="server"
Text='<%# Bind("ProducerInfo") %>'
Height="182px" TextMode="MultiLine" Width="375px" />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Tasting">
Tasting ID
<asp:TextBox ID="ProducerTastingIDTextBox" runat="server"
Text='<%# Bind("ProducerTastingID") %>' />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Restaurant">
ProducerRestaurantID:
<asp:TextBox ID="ProducerRestaurantIDTextBox" runat="server"
Text='<%# Bind("ProducerRestaurantID") %>' />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Community">
ProducerClubID:
<asp:TextBox ID="ProducerClubIDTextBox" runat="server"
Text='<%# Bind("ProducerClubID") %>' />
<br />
ProducerNewsletterID:
<asp:TextBox ID="ProducerNewsletterIDTextBox" runat="server"
Text='<%# Bind("ProducerNewsletterID") %>' />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Admin">
ProducerUserId:
<asp:TextBox ID="ProducerUserIdTextBox" runat="server"
Text='<%# Bind("ProducerUserId") %>' />
<br />
ProducerApprovalStatusID:
<asp:TextBox ID="ProducerApprovalStatusIDTextBox"
runat="server" Text='<%# Bind("ProducerApprovalStatusID") %>' />
<br />
ProducerDateAdded:
<asp:TextBox ID="ProducerDateAddedTextBox" runat="server"
Text='<%# Bind("ProducerDateAdded") %>' />
<asp:LinkButton ID="InsertButton" runat="server"
CausesValidation="True" CommandName="Insert"
Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
<hr />
<br />
<asp:Button ID="ButtonCityAdd" runat="server" Text="Add City" />
<br />
<hr />
<asp:SqlDataSource ID="sqlProducerDetails" runat="server"
ConnectionString="<%$ ConnectionStrings:SQLConnectionString %>"
DeleteCommand="DELETE FROM [ZCProducer] WHERE [ProducerID] =
@ProducerID"
InsertCommand="INSERT INTO [ZCProducer] ([ProducerUserId],
[ProducerTypeID], [ProducerRestaurantID], [ProducerClubID],
[ProducerNewsletterID], [ProducerYearID], [ProducerRegionID],
[ProducerSubRegionID], [ProducerTastingID], [ProducerCityID],
[ProducerStateID], [ProducerCountryID], [ProducerApprovalStatusID],
[ProducerName], [ProducerStreetAddress], [ProducerStreetAddress2],
[ProducerZipCode], [ProducerPhone], [ProducerFax], [ProducerEmail],
[ProducerURL], [ProducerContactName], [ProducerInfo], [ProducerDateAdded])
VALUES (@ProducerUserId, @ProducerTypeID, @ProducerRestaurantID,
@ProducerClubID, @ProducerNewsletterID, @ProducerYearID, @ProducerRegionID,
@ProducerSubRegionID, @ProducerTastingID, @ProducerCityID, @ProducerStateID,
@ProducerCountryID, @ProducerApprovalStatusID, @ProducerName,
@ProducerStreetAddress, @ProducerStreetAddress2, @ProducerZipCode,
@ProducerPhone, @ProducerFax, @ProducerEmail, @ProducerURL,
@ProducerContactName, @ProducerInfo, @ProducerDateAdded)"
SelectCommand="SELECT * FROM [ZCProducer]"
UpdateCommand="UPDATE [ZCProducer] SET [ProducerUserId] =
@ProducerUserId, [ProducerTypeID] = @ProducerTypeID, [ProducerRestaurantID]
= @ProducerRestaurantID, [ProducerClubID] = @ProducerClubID,
[ProducerNewsletterID] = @ProducerNewsletterID, [ProducerYearID] =
@ProducerYearID, [ProducerRegionID] = @ProducerRegionID,
[ProducerSubRegionID] = @ProducerSubRegionID, [ProducerTastingID] =
@ProducerTastingID, [ProducerCityID] = @ProducerCityID, [ProducerStateID] =
@ProducerStateID, [ProducerCountryID] = @ProducerCountryID,
[ProducerApprovalStatusID] = @ProducerApprovalStatusID, [ProducerName] =
@ProducerName, [ProducerStreetAddress] = @ProducerStreetAddress,
[ProducerStreetAddress2] = @ProducerStreetAddress2, [ProducerZipCode] =
@ProducerZipCode, [ProducerPhone] = @ProducerPhone, [ProducerFax] =
@ProducerFax, [ProducerEmail] = @ProducerEmail, [ProducerURL] =
@ProducerURL, [ProducerContactName] = @ProducerContactName, [ProducerInfo] =
@ProducerInfo, [ProducerDateAdded] = @ProducerDateAdded WHERE [ProducerID] =
@ProducerID">
<DeleteParameters>
<asp:Parameter Name="ProducerID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ProducerUserId" Type="String" />
<asp:Parameter Name="ProducerTypeID" Type="Int32" />
<asp:Parameter Name="ProducerRestaurantID" Type="Int32" />
<asp:Parameter Name="ProducerClubID" Type="Int32" />
<asp:Parameter Name="ProducerNewsletterID" Type="Int32" />
<asp:Parameter Name="ProducerYearID" Type="Int32" />
<asp:Parameter Name="ProducerRegionID" Type="Int32" />
<asp:Parameter Name="ProducerSubRegionID" Type="Int32" />
<asp:Parameter Name="ProducerTastingID" Type="Int32" />
<asp:Parameter Name="ProducerCityID" Type="Int32" />
<asp:Parameter Name="ProducerStateID" Type="Int32" />
<asp:Parameter Name="ProducerCountryID" Type="Int32" />
<asp:Parameter Name="ProducerApprovalStatusID" Type="Int32" />
<asp:Parameter Name="ProducerName" Type="String" />
<asp:Parameter Name="ProducerStreetAddress" Type="String" />
<asp:Parameter Name="ProducerStreetAddress2" Type="String" />
<asp:Parameter Name="ProducerZipCode" Type="String" />
<asp:Parameter Name="ProducerPhone" Type="String" />
<asp:Parameter Name="ProducerFax" Type="String" />
<asp:Parameter Name="ProducerEmail" Type="String" />
<asp:Parameter Name="ProducerURL" Type="String" />
<asp:Parameter Name="ProducerContactName" Type="String" />
<asp:Parameter Name="ProducerInfo" Type="String" />
<asp:Parameter Name="ProducerDateAdded" Type="DateTime" />
<asp:Parameter Name="ProducerID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ProducerUserId" Type="String" />
<asp:Parameter Name="ProducerTypeID" Type="Int32" />
<asp:Parameter Name="ProducerRestaurantID" Type="Int32" />
<asp:Parameter Name="ProducerClubID" Type="Int32" />
<asp:Parameter Name="ProducerNewsletterID" Type="Int32" />
<asp:Parameter Name="ProducerYearID" Type="Int32" />
<asp:Parameter Name="ProducerRegionID" Type="Int32" />
<asp:Parameter Name="ProducerSubRegionID" Type="Int32" />
<asp:Parameter Name="ProducerTastingID" Type="Int32" />
<asp:Parameter Name="ProducerCityID" Type="Int32" />
<asp:Parameter Name="ProducerStateID" Type="Int32" />
<asp:Parameter Name="ProducerCountryID" Type="Int32" />
<asp:Parameter Name="ProducerApprovalStatusID" Type="Int32" />
<asp:Parameter Name="ProducerName" Type="String" />
<asp:Parameter Name="ProducerStreetAddress" Type="String" />
<asp:Parameter Name="ProducerStreetAddress2" Type="String" />
<asp:Parameter Name="ProducerZipCode" Type="String" />
<asp:Parameter Name="ProducerPhone" Type="String" />
<asp:Parameter Name="ProducerFax" Type="String" />
<asp:Parameter Name="ProducerEmail" Type="String" />
<asp:Parameter Name="ProducerURL" Type="String" />
<asp:Parameter Name="ProducerContactName" Type="String" />
<asp:Parameter Name="ProducerInfo" Type="String" />
<asp:Parameter Name="ProducerDateAdded" Type="DateTime" />
</InsertParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="sqlProducerType" runat="server"
ConnectionString="<%$ ConnectionStrings:SQLConnectionString %>"
SelectCommand="SELECT [TypeID], [TypeName] FROM
[ZCValuesProducerType]"></asp:SqlDataSource>
<asp:SqlDataSource ID="sqlCountry" runat="server" ConnectionString="<%$
ConnectionStrings:SQLConnectionString %>"
SelectCommand="SELECT [CountryID], [CountryName] FROM
[ZCValuesCountry] ORDER BY [CountrySortOne], [CountryName]">
</asp:SqlDataSource>
<asp:SqlDataSource ID="sqlStates" runat="server" ConnectionString="<%$
ConnectionStrings:SQLConnectionString %>"
SelectCommand="SELECT [StateID], [StateName] FROM [ZCValuesStates]
WHERE ([StateCountryID] = @StateCountryID) ORDER BY [StateName]">
<SelectParameters>
<asp:ControlParameter ControlID="WizardAddProducer$DLCountry"
Name="StateCountryID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="sqlCity" runat="server" ConnectionString="<%$
ConnectionStrings:SQLConnectionString %>"
SelectCommand="SELECT [CityID], [CityName] FROM [ZCValuesCity] WHERE
(([CityStateID] = @CityStateID) AND ([CityCountryID] = @CityCountryID))
ORDER BY [CityName]">
<SelectParameters>
<asp:ControlParameter ControlID="WizardAddProducer$DLState"
Name="CityStateID" PropertyName="SelectedValue"
Type="Int32" />
<asp:ControlParameter ControlID="WizardAddProducer$DLCountry"
Name="CityCountryID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="sqlYears" runat="server" ConnectionString="<%$
ConnectionStrings:SQLConnectionString %>"
SelectCommand="SELECT [YearID], [Year] FROM
[ZCValuesYear]"></asp:SqlDataSource>
<asp:SqlDataSource ID="sqlRegion" runat="server" ConnectionString="<%$
ConnectionStrings:SQLConnectionString %>"
SelectCommand="SELECT [RegionID], [RegionName] FROM [ZCValuesRegion]
WHERE ([RegionCountryID] = @RegionCountryID) ORDER BY [RegionName]">
<SelectParameters>
<asp:ControlParameter ControlID="WizardAddProducer$DLCountry"
Name="RegionCountryID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="sqlSubRegion" runat="server"
ConnectionString="<%$ ConnectionStrings:SQLConnectionString %>"
SelectCommand="SELECT [SubRegionID], [SubRegionName] FROM
[ZCValuesSubRegion] WHERE ([SubParentRegionID] = @SubParentRegionID) ORDER
BY [SubRegionName]">
<SelectParameters>
<asp:ControlParameter
ControlID="WizardAddProducer$DropDownListRegion" Name="SubParentRegionID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
</asp:Content>
- 10
- User Control's Default Property Values do Not Appear In PropertiesHi Jonathan,
Please refer to the code below to create the CotnrolLibrary and then use it
in your App.
namespace WebControlLibrary1
{
/// <summary>
/// Summary description for WebCustomControl1.
/// </summary>
[DefaultProperty("Text"),
ToolboxData("<{0}:PopupGreeting runat=server></{0}:PopupGreeting>")]
public class PopupGreeting : System.Web.UI.Control
{
[Bindable(true),
Category("Appearance"),
DefaultValue("")]
public string PopupMessage
{
get
{
// See if the item exists in the ViewState
object popupMessage = this.ViewState["PopupMessage"];
if (popupMessage != null)
return this.ViewState["PopupMessage"].ToString();
else
return "Welcome to my Web site!";
}
set
{
// Assign the ViewState variable
ViewState["PopupMessage"] = value;
}
}
[Bindable(true),
Category("Appearance"),
DefaultValue("")]
public bool Enabled
{
get
{
// See if the item exists in the ViewState
object enabled = this.ViewState["Enabled"];
if (enabled != null)
return (bool) this.ViewState["Enabled"];
else
return true;
}
set
{
// Assign the ViewState variable
ViewState["Enabled"] = value;
}
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
string scriptKey = "intoPopupMessage:" + this.UniqueID;
if (!Page.IsStartupScriptRegistered(scriptKey) && this.Enabled &&
!Page.IsPostBack)
{
string scriptBlock =
@"<script language=""JavaScript"">
<!--
alert(""%%POPUP_MESSAGE%%"");
// -->
</script>";
scriptBlock = scriptBlock.Replace("%%POPUP_MESSAGE%%", this.PopupMessage);
Page.RegisterStartupScript(scriptKey, scriptBlock);
}
}
}
}
Regards,
Manish
www.ComponentOne.com
"Jonathan Wood" wrote:
> Below is a user control (ascx file) I created.
>
> Everything works fine except, when I first place an instance of the control
> on a form and look at the associated properties, my initial property values
> appear blank. They only show a value if I enter a new value.
>
> What is the trick to have my default property values appear in the
> properties window?
>
> Thanks.
>
> --
> Jonathan Wood
> SoftCircuits Programming
> http://www.softcircuits.com
>
> <%@ Control Language="C#" ClassName="HelpButton" %>
>
> <script runat="server">
>
> protected string _helpFile = "Help.aspx";
> protected string _imageUrl = "Help.png";
>
> public string HelpFile
> {
> get { return _helpFile; }
> set { _helpFile = value; }
> }
>
> public string ImageURL
> {
> get { return _imageUrl; }
> set { _imageUrl = value; }
> }
>
> protected void Page_Load(object sender, EventArgs e)
> {
> RegisterClientScripts();
> }
>
> protected override void Render(HtmlTextWriter writer)
> {
> base.Render(writer);
>
> // Render control
> writer.Write(String.Format("<input type=\"image\" src=\"{0}\" alt=\"Help\"
> onclick=\"javascript:return ShowHelp('{1}');\" style=\"border-width:0px;\",
> />",
> ResolveUrl("~/Images/Help.jpg"), ResolveUrl("~/Help/" + HelpFile)));
> }
>
> protected void RegisterClientScripts()
> {
> // Create client-side scripts to generate kilograms from pounds and vice
> versa
> if (!Page.ClientScript.IsClientScriptBlockRegistered("ShowHelp"))
> {
> Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "ShowHelp",
> "function ShowHelp(url){" +
> "window.open(url, \"_blank\",
> \"height=300,width=450,toolbar=no,status=no,menubar=no,location=no,scrollbars=yes\");"
> +
> "return false;}", true);
> }
> }
>
> </script>
>
>
- 11
- application mapping in iisHi,
In an attempt to get every request for a particular virtual directory to go
through ASP.NET I've been trying to add a wildcard application mapping. The
scenario is that any url for that VD, whether it resolves to an actual file
or not, can be intercepted by an HttpModule and ultimately redirected (using
RewritePath) to a resource of my choosing.
I was hoping that just adding the wildcard mapping to the IIS VD would work.
But it doesn't seem to. In fact, now I can't get ANY urls to work - even if
they are to real files. Everything just gives me a 404. This includes aspx,
html, jpg etc...
The mapping I added was for the aspnet_isapi.dll, mapped to the extension .*
and limited to GET,HEAD,POST,DEBUG. I also tried it with all verbs but that
didn't work either. It was added to all the existing mappings the asp.net
registers.
I'm using windows xp pro.
Can anyone offer any guidance?
Cheers
Ian
- 12
- BUG: ASP.NET Returns a New Session ID For Each RequestThis does not happen frequently, but does happen in rare unkown cases.
For example, at the time I'm writing this post, I'm having this problem
again.
The test page I'm browsing simply displays the SessionID. Each time I
refresh the page, the SessionID gets a new value!!!
The result is that Session state is totally lost when in InProc mode! In
StateServer mode, it simply says that the data cannot be serialized.
Hope Microsoft will hear my voice.
Thanks.
- 13
- Strip space before page renderingIs there any benefit to stripping all the space from the page before
rendering by overriding the page render and using the htmltextwriter and
stringbuilder to strip linefeeds, tabs and extra space etc. I have noticed
that may site's source code is like this. Is this because it is better for
the browser or harder for someone to be able to read it. Or maybe there is a
method or command to do this automatically?
Any thoughts are appreciated.
Mike
- 14
- Dynamic forms with input boxes added at run time.I am programming input forms in Asp.net 2.0
Some textboxes are static on the form and viewstate works fine.
Some textboxes have to be dynamically added to the form at run-time which
makes viewstate difficult to maintain. Sometimes I have got viewstate to
magically work. Sometime I have to manually restore viewstate.
What is the best way to deal with dynamically created input boxes?
--
Arne Garvander
Certified Geek
Professional Data Dude
- 15
- Cookies and NET 2.0I am rewriting my web app in VS 2005, the thing is that it uses cookies to
keep trak of some user selections, the cookie appears to be written to the
users computer but the webapp is simply ignoring them, what can be causing
this?
Thanks
|
|
|