| learn regular expressions |
|
 |
Index ‹ dotnet-framework-aspnet
|
- Previous
- 2
- Use Excelsheet in ASP.NET for calculationHi,
I want to use a difficult Excelsheet as source for my calculation in a
ASP.NET (C#) page. I have 5 input fields on my ASP.NET page and when I press
the submit button I want to put these values into the sheet in cell A1:A5.
And then in A6 an awnser will appear, this awnser needs to be shown on the
ASP.NET page.
Is this possible? And how? (examples) And what serverside software do I need?
- 3
- How to set position of a web control depending on other control's position at run-time?Dear all,
Take the simple example of my case: There're two label controls and the
contents are assigned dynamically. I want to put the second one on the
right-hand-side of the first one without any gap between them. Since I
don't set the width property of both controls at design phrase to make them
"AutoSize" enable and avoid word-wrap, I can't get the width of the first
control to determine "position-should-be" of the second one at run-time.
Though somebody has designed a complicated method to calculate the actual
width of a string according to text content as well as font size, I found
that the size represented for label control is "small, medium, large, etc"
instead of the actual point / pixel size. I don't know how to convert
something like "small" to point / pixel size to start the calculation.
Does anybody have good idea to manage my problem? Thanks for your attention
and kindly help!
Regards,
James Wong
- 5
- C# ASP.NET Thumbnail Generator issueGreetings all,
I am having a problem with an asp.net application using C# which is a
thumbnail generator. Here is the code used...
http://www.eggheadcafe.com/articles/20030515.asp
It works fine for .jpg images but for some reason it doesn't work with .gif
images. The author of the article says it works fine for him but I can't get
it to work. I was wondering if anyone here can shed some light?
I have my permissions set for read, write, etc.. and as I said it works fine
for jpg's.
Thanks, David
- 6
- Web Printing problemHi all,
I'm using crystal report 10 that allow client side to view the report with
browser. But there must preview the document before printing. Are there any
method to print the documetn without preview while the web user click the
button?
Thx
- 6
- Getting/Setting JS VarsHello....
I am working on a control that involves a fair amount of javascript... its a
editor pain of sorts using a textarea.
My problem is... setting the contents of the textarea from a property, and
when the .Text propery is read, how to have that read the js var that
represents that?
I was told I could render javascript with the var set, on postback with js,
stick the js var, into hidden form input and parse accordingly...
then I was told this was wrong and was told to override
onCreateControlCollection and have it add HtmlInputHidden or something...
I know its probably very common, and so I hope to get the best way to do
this
THanks
Wes
- 7
- how define a css file in a asp page who inherits from a masterpagHi,
i have an asp page (page1.aspx) that inherits from a masterpage
(MasterPage.master)
so i try to define a stylesheet (mystyle.css) page to Page1.aspx and i have
to put a <link> tag between <head> and </head> .
But my problem is in a page who inherits from a masterpage i have no the tag
<head> and </head> and i can't reference my styleSheet
so i don't know how i can define my css file in the asp page who inherits
from a masterpage
thanks for your help
--
Sebho
- 7
- Multiple data setsHi,
I have one page with four reports in separate datagrids. I need to generate
one report in excel format.
I wrote a script that generate reports for every datagrid separately.
Now, what I need is to create one master report and to combine these four
datagrids into one datagrid programmatically (is it possible?) or to combine
datasets before biniding and then bind this one dataset to one datagrid.
Any help will be greatly appreciated.
Thank you,
Val
- 7
- Webservice htc error in receievehi to all
i have a problem calling a webservice method using the webservice.htc
the problem is ..
my webservice method created using c# , accepts a string param
when calling this method from a browser using the behavior file , some
characters recieved as '??' , this characters has a code above 127.
for example:) sending a parm with value '123x' recieved as 123??
where x is a unicode character.
i don't know what is wrong .
thanks for your help.
- 7
- SSL for very simple security need in web service appI'm looking for a nudge in the right direction.
We have an order processing system that currently has a simple ASP.NET web
interface. Various clients who want to place orders already have a userID
and password specified within our application (i.e., not Windows
authentication) that they must supply in order to logon to their 'account'
and submit orders for themselves. They communicate from a browser over the
public internet. The browsers/server utilize SSL for encrypting the web
traffic.
We'd now like to implement this functionality as a web service to interact
with some desktop applications that can generate orders. We'd like to have
the remote app simply transfer the data, presumably in an XML format that we
already have defined, over the public internet, providing their userID and
password.
My question is: if we just add the userID and password in the XML
schema/data, is the SSL layer sufficient to ensure that anyone who might
intercept the traffic en route would not be able to determine the UserID and
password? Once we have the XML data in our app, it would be a trivial matter
to determine if the data is coming from a source that had a legitimate,
active UserID and a valid password. And that's pretty much all we'd need.
I read about WSE, WS-Security, etc. and it all seems like so much overkill
for my needs -- but I can't locate a single, simple scenario that looks like
what I have in mind here.
Any direction would be greatly appreciated!
Rob Schripsema
DeWaard and Jones Company
Bellingham, WA
- 8
- 8
- FCKEditor not working in contentplaceholderI'm having trouble getting FCKEditor to work in a contentplaceholder.
The code works fine on a single page, but fails in a master/details
configuration. Specifically, FCKEditor won't render when embedded in a
contentplaceholder. I tested it both on IE 7.0 and FF 2.0.0.11 with
ASP.NET 2.0 and 3.0 using FCKEditor version 2.5 and also .NET version
2.2.
FCKEditor actually requires a dll (FredCK.FCKeditorV2.dll) in the bin
directory. Are there any special registrations steps required when
binding an assembly control into a details page? All samples I looked
up are implemented on a single page. TIA for any hints.
Sample (works):
<%@ Page Language="VB" ValidateRequest="false"
AutoEventWireup="false" %>
<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2"
Assembly="FredCK.FCKeditorV2" %>
...
<form id="form1" runat="server">
<FCKeditorV2:FCKeditor id="FCKeditor1" BasePath="~/FCKeditor/"
runat="server" />
<br />
<input id="Submit1" type="submit" value="Submit" runat="server" /
>
</form>
Sample (fails ie. FCKEditor not rendered):
<%@ Page Language="VB" MasterPageFile="~/Site.master"
ValidateRequest="false" AutoEventWireup="false" Title="Untitled Page"
%>
<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2"
Assembly="FredCK.FCKeditorV2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="CPM1" Runat="Server">
<FCKeditorV2:FCKeditor id="FCKeditor1" BasePath="~/FCKeditor/"
runat="server" />
<br />
<input id="Submit1" type="submit" value="Submit" runat="server" />
</asp:Content>
- 9
- Internet Explorer & Response.RedirectAnyone know how I can figure out the figure out the response.redirect trail a browser goes through when I'm using response.redirect on the server. Right now Internet Explorer just automatically redirects, I need to figure out, on the client, the pages it is being told to go to. Yes I know I can look in the address bar, but say the Response object is redirecting 3 or 4 pages per Request. I need this for a debugging issue.
Thanks
--Michael
- 10
- variable from ASP.NET page to JSP pageFrom my ASP.NET page, I want to call a JSP page and somehow pass a username
and password to the JSP page. What's the best way to do this, keeping
security in mind.
- 10
- Best way to implement custom control: Repeater vs. Anything ElseI am struggling with implementing somewhat complicated UI web-control. I
explored Repeater, but I am not sure if it's the best way to go. I am leaning
towards writing my own custom control and creating elements on the fly
dynamically.
I have a control that needs to display 3 columns and n number of rows
depending on number of records. Sounds simple. But each Row has a control
with its own data source binding and value must be selected based on data.
Each row can be removed by the user or new row added. So far Repeater can do
all that, and I developed a prototype that does it.
But The problem is that I need adjust colspan=x for different. If there's no
previous data, I need to hide 1 column which has delete button and do colspan
= 2 on the last column. So user has to create a new record. I can't find an
easy way to do it, rather then writing custom code on ItemDataBound event or
ItemCreated and adding HTML text programmatically. But what's the point
having Repeater control? I might as well write my own implementation.
- 15
- parameter passing asp.net vbhi,
I'm a relative newbie to .net but have been an asp developer for a few
years. I'm starting the slow and somehwat painful process of learning
how to do everything I used to do in asp in .net.
i'm using visual studio and am simply trying to do the following:
Pass a value into a stored procedure or a sql query which has been is
passed via a querystring.
I've achieved this by setting the value of the parameter in the
desinger generated code but I would like to be able to handle this in
the page_load. I'd like to check for the existence of a paramater and
pass this value to the query.
I'm sure it's really easy, it certainly is in classic asp but i'm
really struggling with this one.
Anyone help?
|
| Author |
Message |
LeAnne

|
Posted: 2006-5-20 21:01:45 |
Top |
dotnet-framework-aspnet, learn regular expressions
where can i get a concise reference to learn regular expressions in .net?
|
| |
|
| |
 |
Juan T. Llibre

|
Posted: 2006-5-20 21:11:00 |
Top |
dotnet-framework-aspnet >> learn regular expressions
http://www.google.com/search?hl=en&q=%22regular+expressions%22+%22asp.net%22
There's plenty of stuff available on regular expressions and .net.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa駉l : http://asp.net.do/foros/
===================================
"LeAnne" <email***@***.com> wrote in message news:email***@***.com...
> where can i get a concise reference to learn regular expressions in .net?
>
|
| |
|
| |
 |
Laurent Bugnion

|
Posted: 2006-5-21 5:30:00 |
Top |
dotnet-framework-aspnet >> learn regular expressions
Hi,
LeAnne wrote:
> where can i get a concise reference to learn regular expressions in .net?
Download the free tool Regulator at http://regex.osherove.com/
It helps a lot to understand and test your RegExs.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
|
| |
|
| |
 |
prabhupr

|
Posted: 2006-5-21 11:50:00 |
Top |
dotnet-framework-aspnet >> learn regular expressions
http://www.123aspx.com/redir.aspx?res=29071
http://www.codeproject.com/dotnet/Expresso.asp
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=43d952b8-afc6-491b-8a5f-01ebd32f2a6c
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=C712F2DF-B026-4D58-8961-4EE2729D7322
|
| |
|
| |
 |
Kevin Spencer

|
Posted: 2006-5-21 23:08:00 |
Top |
dotnet-framework-aspnet >> learn regular expressions
I have found RegexBuddy (of all the tools I've tried, have, and use), to be
an invaluable tool, both for learning and working with regular expressions.
It is not free (29.95), but can be downloaded for a trial, and is more than
worth the price. It has quite a number of testing and building tools, and an
excellent reference with tutorials as well. It has a Graphic Expression
Builder, which displays a regular expression in a tree view that has a
description of each element. It can be found at http://www.regexbuddy.com/.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
The man who questions opinions is wise.
The man who quarrels with facts is a fool.
<email***@***.com> wrote in message
news:email***@***.com...
> http://www.123aspx.com/redir.aspx?res=29071
> http://www.codeproject.com/dotnet/Expresso.asp
> http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=43d952b8-afc6-491b-8a5f-01ebd32f2a6c
> http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=C712F2DF-B026-4D58-8961-4EE2729D7322
>
|
| |
|
| |
 |
| |
 |
Index ‹ dotnet-framework-aspnet |
- Next
- 1
- Is this the correct Multi-threading approachHi,
I need to kick off a long running process in response to a user action
on my website. I'm not fussed whether it completes correctly or not (it's
just sends a load of emails) but I want control of the webpage to return
immediately to the user.
So all I do in my Server side event handler for the page is :
SiteUsers su = new SiteUsers();
Thread background = new Thread(new ThreadStart(su.EmailUsers));
background.Start();
Will this give me any undesirable side effects in ASP.NET? As I said earlier
I don't care if it completes or not so I've not used any Callback to tell me
when it's done.
thanks
Pete
- 2
- ASPHyper link problemHi,
I am trying to assign value to ASPHyperLink control's NavigateURL
property at run time, but it gets converted to relative address rather
than absolute address and application's address gets prefixed to it.
For exampls my link is www.yahoo.com, now when I click to link the link
goes to http://localhost/CMS?UserControls/WWW.yahoo.com.
So any help ????
Regards
Amit Arora
- 3
- Appending pdf documents into oneHere is what I am trying to do:
Open a.pdf, append b.pdf to it and save the aggregate as
c.pdf.
I want to do it through a program written in .net. I would like to do this
without using any tools or thirdparty components.
What i am trying out is getting the byte stream of the both the documents
and then merging the stream and getting one stream.
Any quick help will be appreciated.
Ganesh
- 4
- Running Windows Applications Via World Wide WebHello,
I apologize for my lack of knowledge in this area, or if this is the
incorrect group to make this post in.
I am designing a website for a client who sells Windows-based image
processing software. They want users to be able to upload an image to
the site, get the image processed by the application, and show the
user the processed file. Is this possible, and if so, how? The
application has a GUI, so I am guessing that it would not just be a
simple matter of piping the image data...
I am an experienced Perl and PHP programmer and web designer, but I
usually work on Unix servers and haven't tackled a problem like this,
so I'm not sure how this would be done. Any information you could give
me would be very much appreciated, even a link to a site where this is
discussed. Thanks in advance for your help.
Matt
- 5
- LINQ and AccessHello,
I have been using LinqToSQL with an SQL database. Is it possible to
use LINQ with an Access Database?
Thanks,
Miguel
- 6
- datagrid linkbutton event and firefoxI inherited some code with a datagrid being populated at run time (ASP.NET C#
page), and each row in the datagrid has a linkbutton. In IE, clicking on the
linkbutton displays the proper piece of content, in an IFRAME when the page
reloads.
In Firefox, I get a blank page. I can see HTML if I View Source, but it's
not the same HTML I get when using IE. It appears the event for the click on
the linkbutton is not running when using Firefox.
The datagrid settings:
AutoGenerateColumns = false
Enabled = true
EnableViewState = true
private void HelpChoicesDataGrid_ItemCommand(object sender,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if (e.CommandName == "ViewHelp")
{
e.Item.BackColor = Color.DarkGray;
HyperLinkToSelection(Convert.ToString(e.Item.ItemIndex));
}
} // End HelpChoicesDataGrid_ItemCommand
protected void HyperLinkToSelection(string bookmarkIndex)
{
System.Text.StringBuilder jScript = new System.Text.StringBuilder();
jScript.Append("<script language=\"JavaScript\">");
jScript.Append("location.href=\"#");
jScript.Append(bookmarkIndex);
jScript.Append("\";");
jScript.Append("</script>");
this.RegisterClientScriptBlock("Bookmark", jScript.ToString());
} // End HyperLinkToSelection
Any ideas?
Thanks,
Dennis
- 7
- Q: Getting values when redirecting to a new page...Hi newbee quiz!
I have a couple of pages where a user enters information.
At the last page i want to present all data, and let the user confirm it.
I dont want to use a response string that adds upp everytime
Like www.myweb.net/do.aspx?quiz=lsl&ordering=1 etc and when going from the
next page to the other add upp the request string. (Or what it's called)
Should i create a class and store all the data, or is there another, smart
way?
I have 4 pages of data to be entered before the confirmation page.
Regards
Martin
- 8
- How to Convert DataRow with Byte Array data to String?How do I do this with: Option Strict On?
I know of the function System.Text.ASCIIEncoding.GetChars, but that
takes a Byte array not a DataRow. So with Option Strict On, how do I
take the byte array in my DataRow, convert it to Text and display it
on my web page without saving the info to disk inbetween?
MemoryStream? Give in and set Option Strict Off?
Thanks for any help,
Paul W (Using VB FW1.1)
- 9
- Export to Excel shows an empty sheetThis is a multi-part message in MIME format.
When I run my Export to Excel, the Spreadheet is empty. Anyone know what may cause this? Here is my code:
Response.Clear()
Response.Charset = ""
Response.ContentType = "application/vnd.ms-excel"
Response.AppendHeader("Content-Disposition", "attachment;filename=" & strFileName & ".xls")
Dim stringWrite As New System.IO.StringWriter
Dim htmlWrite As New System.Web.UI.HtmlTextWriter(stringWrite)
Dim dg As New DataGrid
'Copy data from existing Datagrid to the new Datagrid
dg = dgExport
dg.AllowPaging = False
dg.AllowCustomPaging = False
dg.AllowSorting = False
dg.EnableViewState = False
'Lets make it a generic looking spreadsheet
dg.HeaderStyle.BackColor = Color.LightGray
dg.AlternatingItemStyle.BackColor = Color.White
dg.FooterStyle.BackColor = Color.LightGray
dg.PagerStyle.BackColor = Color.Gainsboro
dg.HeaderStyle.Font.Bold = True
dg.DataBind()
dg.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString)
Response.End()
Paul
<!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.2604" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial size=2>When I run my Export to Excel, the Spreadheet is
empty. Anyone know what may cause this? Here is my
code:</FONT></DIV>
<DIV>
<P><FONT face=Arial size=2>Response.Clear()<BR></FONT><FONT face=Arial
size=2>Response.Charset = ""<BR></FONT><FONT face=Arial
size=2>Response.ContentType = "application/vnd.ms-excel"<BR></FONT><FONT
face=Arial size=2>Response.AppendHeader("Content-Disposition",
"attachment;filename=" & strFileName & ".xls")<BR></FONT></P>
<P><FONT face=Arial size=2>Dim stringWrite As New
System.IO.StringWriter<BR></FONT><FONT face=Arial size=2>Dim htmlWrite As New
System.Web.UI.HtmlTextWriter(stringWrite)</FONT></P>
<P><FONT face=Arial size=2>Dim dg As New DataGrid</FONT></P>
<P><FONT face=Arial size=2>'Copy data from existing Datagrid to the new
Datagrid</FONT></P>
<P><FONT face=Arial size=2>dg = dgExport</FONT></P>
<P><FONT face=Arial size=2>dg.AllowPaging = False<BR></FONT><FONT face=Arial
size=2>dg.AllowCustomPaging = False<BR></FONT><FONT face=Arial
size=2>dg.AllowSorting = False<BR></FONT><FONT face=Arial
size=2>dg.EnableViewState = False</FONT></P>
<P><FONT face=Arial size=2>'Lets make it a generic looking
spreadsheet<BR></FONT><FONT face=Arial size=2>dg.HeaderStyle.BackColor =
Color.LightGray<BR></FONT><FONT face=Arial
size=2>dg.AlternatingItemStyle.BackColor = Color.White<BR></FONT><FONT
face=Arial size=2>dg.FooterStyle.BackColor = Color.LightGray<BR></FONT><FONT
face=Arial size=2>dg.PagerStyle.BackColor = Color.Gainsboro<BR></FONT><FONT
face=Arial size=2>dg.HeaderStyle.Font.Bold = True</FONT></P>
<P><FONT face=Arial size=2>dg.DataBind()<BR></FONT><FONT face=Arial
size=2>dg.RenderControl(htmlWrite)</FONT></P>
<P><FONT face=Arial size=2>Response.Write(stringWrite.ToString)<BR></FONT><FONT
face=Arial size=2>Response.End()</FONT></P>
<P><FONT face=Arial size=2>Paul</FONT></P></DIV></BODY></HTML>
- 10
- Problem with Response.Redirect!!Hello,
I have urls saved in a database. When you access the secutity.aspx it
accesses the grabs the url and redirects the client to his page Eg-
client.apsx.
Problem is that all the images in client.aspx is not showing up when I use
response.redirect.
But when I directly access it http://myserver/client.aspx it works.
Am I missing something?
Thanks.
jay
- 11
- _vti_cnf ?In my VS web forms project folders there always seems to be a sub-folder with the name _vti_cnf and that sub-folder seems to contain copies of all of the webforms and code behind files. Does anyone know what this stuuf is. I'm backing up my work to a 100mb Iomega disk and it's running out of room just before the backup is done and if I can get rid of this stuff it might help
Also, there are files with the extension of .resx which don't seem to be required when I post the completed projects to the web. Some of them also seem to be constantly 'checked out' from the Source Safe but don't check back in when I tell it to check everything in. Are these files required
Thanks
JOhn
- 12
- diff <usercontrol> & usercontrol.new()there's no problem when calling my usercontrol class as follows:
<%@ Register TagPrefix="User" TagName="Element" Src="~/Element.ascx" %>
<User:Element id="elmFirstElement" runat="server">
but, there is a problem when i'm calling it like this:
controls.add(new Elements())
(i'm actually filling a placeholder with a bunch of my usercontrol's)
it seems like the Elements object isn't being filled with the
webcontrols defined in the ascx file.
could someone explain me how usercontrols initialize?
thanx.
Sam.
- 13
- DataTable or DataSet? OleDB or Sql..?Hello
I was wondering if you guys could help me out...... I might have mixed the
things up so bare with me.
I was wondering if I should use datatable or dataset when displaying data in
my asp.net page? Mostly i dont need paging, just showing data...... and does
both support paging in the datagrid control if i need it?
and which one is faster? I "always" use stored procedures for select,
insert, update, delete........ so I basically just send parameters to them
and let sql-server do the work, and not having some thing i modify before i
send the result to sql-server. (hope i explained correct there).
And second....... Should I use OleDB Provider or "regular" Sql-"class" (?)
to connect and execute things against my sql 2000 server? I've always used
OleDB provider when working with regular asp. Any pros/cons?
TIA
/Lasse
- 14
- (urgent)HttpRuntime Hi all,
I had my web.config file as below...
<system.web>
<httpRuntime executionTimeout="90" maxRequestLength="102400"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100"
enableVersionHeader="true"/>
.....................etc
But when i m trying to upload a file of size 520KB it is not uploading......
(actually i had uploaded the same file in localhost yesterday and i
uploaded the same web.config file to server system.)
wat r the posiible errors for not uploading in server while it is ok in
local host
thanks in advance ,
anu...
- 15
- Application Tracing for a Single Session ?I'm trying to implement application tracing for a single session but am not
having much luck. I'd like to isolate TraceContext application level
messages for a single session and have them logged to trace.axd (or even a
file). The TraceContext class is sealed and exposes no useful events so it's
pretty uncooperative. I have also been looking at the WebPageTraceListener
class but am not sure if it is much use in this quest. Any ideas?
TIA
|
|
|