Saturday, March 31, 2012
sub-selecting a DataTable?
Dim dsMyData As DataSet
dsMyData = CallWebService(Param1,Param2)
Dim dtUsersTable As DataTable = dsMyData.Tables("Users")
I have a Web service that fills dsMyData with a couple tables.
My question is, from dsMyData.Tables("Users"), which contains all
users, how can I create another datatable that only returns for
UserID=1?
thanks...> Dim dsMyData As DataSet
> dsMyData = CallWebService(Param1,Param2)
> Dim dtUsersTable As DataTable = dsMyData.Tables("Users")
> I have a Web service that fills dsMyData with a couple tables.
> My question is, from dsMyData.Tables("Users"), which contains all
> users, how can I create another datatable that only returns for
> UserID=1?
This may not be the easiest way, but it should work:
'line below copies structure of Users table to NewUsers table
Dim newUserTable As DataTable = dsMyData.tables("Users").Clone
'line below renames the cloned table as to avoid naming conflicts
newUsersTable.tableName = "NewUsers"
'selects users with userid=1 and imports into NewUsers table
For Each dr As DataRow In dsMyData.tables("Users").Select("UserID=1")
newUsersTable.ImportRow(dr)
Next
' adds the newUsers table to the dataset
dsMyData.Tables.Add(newUsesTable)
Hope it helps.
Jeppe Jespersen
Jeppe,
That did help.
Thank you very much.
Eych
> That did help.
> Thank you very much.
No propblemo. :-)
Jeppe
sub-selecting a DataTable?
Dim dsMyData As DataSet
dsMyData = CallWebService(Param1,Param2)
Dim dtUsersTable As DataTable = dsMyData.Tables("Users")
I have a Web service that fills dsMyData with a couple tables.
My question is, from dsMyData.Tables("Users"), which contains all
users, how can I create another datatable that only returns for
UserID=1?
thanks...> Dim dsMyData As DataSet
> dsMyData = CallWebService(Param1,Param2)
> Dim dtUsersTable As DataTable = dsMyData.Tables("Users")
> I have a Web service that fills dsMyData with a couple tables.
> My question is, from dsMyData.Tables("Users"), which contains all
> users, how can I create another datatable that only returns for
> UserID=1?
This may not be the easiest way, but it should work:
'line below copies structure of Users table to NewUsers table
Dim newUserTable As DataTable = dsMyData.tables("Users").Clone
'line below renames the cloned table as to avoid naming conflicts
newUsersTable.tableName = "NewUsers"
'selects users with userid=1 and imports into NewUsers table
For Each dr As DataRow In dsMyData.tables("Users").Select("UserID=1")
newUsersTable.ImportRow(dr)
Next
' adds the newUsers table to the dataset
dsMyData.Tables.Add(newUsesTable)
Hope it helps.
Jeppe Jespersen
Jeppe,
That did help.
Thank you very much.
Eych
> That did help.
> Thank you very much.
No propblemo. :-)
Jeppe
Saturday, March 24, 2012
Suggestions for implementing personalization
navigate the pages without signing in. However, authorization and
authentication is required to purchase products.
Currently I am using session variables to monitor if the user is logged in
or not. I have inherited a base page from the page class to handle the chec
k
for this in every page.
Forms authentication seems to forceful for this situation where I would like
to remain 'hands-off' until the user decides to login.
Suggestions are greatly appreciated, thank you."examnotes" <NathanV@.discussions.microsoft.com> wrote in
news:65AFB42E-B97D-464F-98C7-3C251BBAAED7@.microsoft.com:
> I'm creating an e-commerce site and would like users to be able to
> freely navigate the pages without signing in. However, authorization
> and authentication is required to purchase products.
> Currently I am using session variables to monitor if the user is
> logged in or not. I have inherited a base page from the page class to
> handle the check for this in every page.
> Forms authentication seems to forceful for this situation where I
> would like to remain 'hands-off' until the user decides to login.
What you probably want is to implement roles based authentication.
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/
Suggestions for implementing personalization
navigate the pages without signing in. However, authorization and
authentication is required to purchase products.
Currently I am using session variables to monitor if the user is logged in
or not. I have inherited a base page from the page class to handle the check
for this in every page.
Forms authentication seems to forceful for this situation where I would like
to remain 'hands-off' until the user decides to login.
Suggestions are greatly appreciated, thank you."=?Utf-8?B?TmF0aGFuVg==?=" <NathanV@.discussions.microsoft.com> wrote in
news:65AFB42E-B97D-464F-98C7-3C251BBAAED7@.microsoft.com:
> I'm creating an e-commerce site and would like users to be able to
> freely navigate the pages without signing in. However, authorization
> and authentication is required to purchase products.
> Currently I am using session variables to monitor if the user is
> logged in or not. I have inherited a base page from the page class to
> handle the check for this in every page.
> Forms authentication seems to forceful for this situation where I
> would like to remain 'hands-off' until the user decides to login.
What you probably want is to implement roles based authentication.
--
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Suggestions for help authoring tool for ASP.Net
Microsoft provide provide downloadable tools/software like they did for
windows applications (i.e. WinHelp or HTML help)?
We purchased Robohelp awhile back ago when we working with asp web
applications, but this is very expensive. We are looking for something else
that is somewhat compareable for asp.net, but no as expensive.
Any suggestions on Microsoft products or third-party products are appreciate
d?ASP web matrix is a free asp.net web authoring tool.
http://asp.net/webmatrix/default.as...ndex=4&tabId=46
"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:8D6B7A2A-BC25-423F-8D08-C4725507C370@.microsoft.com...
> We would like to add online for the users in our asp.net applications.
Does
> Microsoft provide provide downloadable tools/software like they did for
> windows applications (i.e. WinHelp or HTML help)?
> We purchased Robohelp awhile back ago when we working with asp web
> applications, but this is very expensive. We are looking for something
else
> that is somewhat compareable for asp.net, but no as expensive.
> Any suggestions on Microsoft products or third-party products are
appreciated?
http://www.steema.com/products/teegofer/overview.html
for pricing:
http://www.steema.com/ordering/order_tgfhelpnet_n.shtml
I am not affiliated nor have I used this product ... merely submit for your
review.
"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:8D6B7A2A-BC25-423F-8D08-C4725507C370@.microsoft.com...
> We would like to add online for the users in our asp.net applications.
> Does
> Microsoft provide provide downloadable tools/software like they did for
> windows applications (i.e. WinHelp or HTML help)?
> We purchased Robohelp awhile back ago when we working with asp web
> applications, but this is very expensive. We are looking for something
> else
> that is somewhat compareable for asp.net, but no as expensive.
> Any suggestions on Microsoft products or third-party products are
> appreciated?
Suggestions to prevent VICIOUS data input?
In places where I allow data input by users (sign up forms, comments,
etc...) do I need to manually safeguard my site against vicious attacks (SQL
injection, etc...)? Should I just run all input thru a filter that removes
all special characters, like asterick, semicolon, etc...? Or, is this
handled internally so I don't have to worry about it? Any suggestions?
Thanks.VB Programmer wrote:
> Using ASP.NET 2.0/SQL Express...
> In places where I allow data input by users (sign up forms, comments,
> etc...) do I need to manually safeguard my site against vicious attacks (SQL
> injection, etc...)? Should I just run all input thru a filter that removes
> all special characters, like asterick, semicolon, etc...? Or, is this
> handled internally so I don't have to worry about it? Any suggestions?
> Thanks.
It depends... You can validate your form entries with regular
expressions (client side AND server side) and the like. Other than that,
the main thing is using parameterized queries - *NOT* string
concatenation to make your SQL queries (that's really asking for
trouble). That would be a good start :) ASP.NET also does protect you to
some extent.
john smith wrote:
> VB Programmer wrote:
> > Using ASP.NET 2.0/SQL Express...
> > In places where I allow data input by users (sign up forms, comments,
> > etc...) do I need to manually safeguard my site against vicious attacks (SQL
> > injection, etc...)? Should I just run all input thru a filter that removes
> > all special characters, like asterick, semicolon, etc...? Or, is this
> > handled internally so I don't have to worry about it? Any suggestions?
> > Thanks.
> It depends... You can validate your form entries with regular
> expressions (client side AND server side) and the like. Other than that,
> the main thing is using parameterized queries - *NOT* string
> concatenation to make your SQL queries (that's really asking for
> trouble). That would be a good start :) ASP.NET also does protect you to
> some extent.
What he said ^
Also, when using regular expressions, look for GOOD input, and reject
anything that doesn't match. Doing it the other way around, you're
bound to miss something...
Damien
Hi, as part of your research, you should investigate a product I wrote that
handles SQL Injection and Cross Site Scripting attacks. It is VAM: Visual
Input Security. (http://www.peterblum.com/vise/home.aspx)
-- Peter Blum
www.PeterBlum.com
Email: PLBlum@.PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"VB Programmer" <dont@.emailme.com> wrote in message
news:eGdttg6JGHA.916@.TK2MSFTNGP10.phx.gbl...
> Using ASP.NET 2.0/SQL Express...
> In places where I allow data input by users (sign up forms, comments,
> etc...) do I need to manually safeguard my site against vicious attacks
> (SQL injection, etc...)? Should I just run all input thru a filter that
> removes all special characters, like asterick, semicolon, etc...? Or, is
> this handled internally so I don't have to worry about it? Any
> suggestions?
> Thanks.
Suggestions to prevent VICIOUS data input?
In places where I allow data input by users (sign up forms, comments,
etc...) do I need to manually safeguard my site against vicious attacks (SQL
injection, etc...)? Should I just run all input thru a filter that removes
all special characters, like asterick, semicolon, etc...? Or, is this
handled internally so I don't have to worry about it? Any suggestions?
Thanks.VB Programmer wrote:
> Using ASP.NET 2.0/SQL Express...
> In places where I allow data input by users (sign up forms, comments,
> etc...) do I need to manually safeguard my site against vicious attacks (S
QL
> injection, etc...)? Should I just run all input thru a filter that remove
s
> all special characters, like asterick, semicolon, etc...? Or, is this
> handled internally so I don't have to worry about it? Any suggestions?
> Thanks.
>
It depends... You can validate your form entries with regular
expressions (client side AND server side) and the like. Other than that,
the main thing is using parameterized queries - *NOT* string
concatenation to make your SQL queries (that's really asking for
trouble). That would be a good start :) ASP.NET also does protect you to
some extent.
john smith wrote:
> VB Programmer wrote:
> It depends... You can validate your form entries with regular
> expressions (client side AND server side) and the like. Other than that,
> the main thing is using parameterized queries - *NOT* string
> concatenation to make your SQL queries (that's really asking for
> trouble). That would be a good start :) ASP.NET also does protect you to
> some extent.
What he said ^
Also, when using regular expressions, look for GOOD input, and reject
anything that doesn't match. Doing it the other way around, you're
bound to miss something...
Damien
Hi, as part of your research, you should investigate a product I wrote that
handles SQL Injection and Cross Site Scripting attacks. It is VAM: Visual
Input Security. (http://www.peterblum.com/vise/home.aspx)
-- Peter Blum
www.PeterBlum.com
Email: PLBlum@.PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"VB Programmer" <dont@.emailme.com> wrote in message
news:eGdttg6JGHA.916@.TK2MSFTNGP10.phx.gbl...
> Using ASP.NET 2.0/SQL Express...
> In places where I allow data input by users (sign up forms, comments,
> etc...) do I need to manually safeguard my site against vicious attacks
> (SQL injection, etc...)? Should I just run all input thru a filter that
> removes all special characters, like asterick, semicolon, etc...? Or, is
> this handled internally so I don't have to worry about it? Any
> suggestions?
> Thanks.
>
Thursday, March 22, 2012
supervision on mass e mail sending
Sub Mailshot(ByVal adress As String, ByVal subject As String, ByVal body As String)
Dim msgmail As MailMessage = New MailMessage()SmtpMail.SmtpServer = "smtp.012.net.il"
msgmail.From = "shoresh@dotnet.itags.org.shoresh.org.il"Try
msgmail.To = adress
msgmail.Body = body
msgmail.Subject = subject
msgmail.BodyFormat = MailFormat.Html
SmtpMail.Send(msgmail)
Catch exc As Exception
'DO WHATEVER ERROR HANDLING
End Try
msgmail = Nothing
End Sub
my site have something like 1000 users. and i call the sub one by one (for...next loop)
I have two questions about this e mail sending:
1) does this loop is going to overflow? if yes, what should i do to prevent it?
2) do i have any way to supervise the sending progress, i should to refresh the page every time, something that i think is not so good idea!!
thanksA For...Next loop is better suited for what you are trying to acomplish
i do use a for next loop to call the sending procedure. i wondered if this calling again and again wont stuck it.
Can you create a group and put all your users on it and then just send an email to the group?
Support for generating random passwords in ASP.NET
I am building web in ASP.NET using VB.NET to code the pages. I want to gene
rate random passwords for users. I know that password hashing is built right
into the .NET Framework. I was wondering if there is any built-in support f
or generating random passwo
rds in .Net. If the support is built-in, can you show me how to do it.
Thanks,
JoeThere is no random password functionality built into .NET.
But there is the Math.Random namespace that could easily help you string
together some random characters.
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:C6413BC5-1DF5-4C8D-ADC2-BCEB6BBAB5F8@.microsoft.com...
> Hi,
> I am building web in ASP.NET using VB.NET to code the pages. I want to
generate random passwords for users. I know that password hashing is built
right into the .NET Framework. I was wondering if there is any built-in
support for generating random passwords in .Net. If the support is
built-in, can you show me how to do it.
> Thanks,
> Joe
>
Joe
Try this.. http://www.4guysfromrolla.com/webte...t011100-1.shtml
It's ASP rather than .NET, but shouldn't take too much conversion.
HTH
Dan
"Joe" wrote:
> Hi,
> I am building web in ASP.NET using VB.NET to code the pages. I want to generate r
andom passwords for users. I know that password hashing is built right into the .NET
Framework. I was wondering if there is any built-in support for generating random p
ass
words in .Net. If the support is built-in, can you show me how to do it.
> Thanks,
> Joe
>
Support for generating random passwords in ASP.NET
I am building web in ASP.NET using VB.NET to code the pages. I want to generate random passwords for users. I know that password hashing is built right into the .NET Framework. I was wondering if there is any built-in support for generating random passwords in .Net. If the support is built-in, can you show me how to do it.
Thanks,
JoeThere is no random password functionality built into .NET.
But there is the Math.Random namespace that could easily help you string
together some random characters.
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:C6413BC5-1DF5-4C8D-ADC2-BCEB6BBAB5F8@.microsoft.com...
> Hi,
> I am building web in ASP.NET using VB.NET to code the pages. I want to
generate random passwords for users. I know that password hashing is built
right into the .NET Framework. I was wondering if there is any built-in
support for generating random passwords in .Net. If the support is
built-in, can you show me how to do it.
> Thanks,
> Joe
Joe
Try this.. http://www.4guysfromrolla.com/webte...t011100-1.shtml
It's ASP rather than .NET, but shouldn't take too much conversion.
HTH
Dan
"Joe" wrote:
> Hi,
> I am building web in ASP.NET using VB.NET to code the pages. I want to generate random passwords for users. I know that password hashing is built right into the .NET Framework. I was wondering if there is any built-in support for generating random passwords in .Net. If the support is built-in, can you show me how to do it.
> Thanks,
> Joe