|
Hi.How can we display two tables in a single data grid.
|
|
|
|
|
You can use templates in GridView.Just create your template and put your controls - which you desire to use - in the template and bind your controls to the fields you fetch from your database.
http://www.asp.net/learn/dataaccess/tutorial12cs.aspx?tabid=63[^]
Check this link written above out
Hope it helps...
atarikg......................
-- modified at 16:51 Sunday 17th June, 2007
|
|
|
|
|
Could you be little specific, I thing you can user NESTED DatGrid to dispay more than 1 table
Nobody is perfect i'm Nobody
|
|
|
|
|
Hi,
I have the following regular expression in my asp:RegularExpressionValidator control:
<asp:RegularExpressionValidator
ID="RegularExpressionValidator_Password"
ControlToValidate="Password"
Display="Dynamic"
ErrorMessage="Invalid password:<br />Password must have 8 to 50 characters,
cannot contain spaces, must begin with a mixed case alpha character, at
least one uppercase character, at least one lowercase character, at least
one numeric character, and one special character of the following: # $ _"
ValidationExpression="^(?=[a-zA-Z])(?=.*[0-9])(?=.*[#\$_])(?=.*[A-Z])(?=.*[a-z])(?!.*[^a-zA-Z0-9#\$_])(?!.*\s).{8,50}$"
ValidationGroup="CESignIn"
runat="server">
This regular expression is only triggered in IE7, in Mozilla it is not. My password is Password3#. This correct according to the regular expression. But why is it triggering when I type the password in IE7?
Please can someone help?
Regards
ma se
|
|
|
|
|
My second post here - I'm really loving this site...anyway, here is my question:
1. Is there a free public domain web service where I can send an IP Address and have the geographic location info returned?
2. Or a public domain file that I can download that provides similar info that I can parse?
Not sure if this the right spot to post this message, but thanks in advance! (I did a quick search on this site, but couldn't find this question)
|
|
|
|
|
I googled and found lots of paid services, and this: http://www.geobytes.com/IpLocator.htm[^]
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi it is very useful information.Thank u.
I saw this site http://www.geobytes.com/IpLocator.htm[^]
but i dont know how to use it in ASP.net 2003??
plz help me??
-- modified at 1:34 Monday 18th June, 2007
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Vipin, I went to that site. But it doesn't seem like it does what I want it too. I want to do something like:
WebRefreenceIPLocation.WebRefreenceIPLocation wsIPLocation = new WebRefreenceIPLocation.WebRefreenceIPLocation();
genericsStringList = weIPLocation.GetAllIpLocationInfo(TextBoxWebVisitorsIpAddress.Text);
Except I wouldn't use a textbox, I would pull the IP out of the Request obviously.
|
|
|
|
|
I am working on a project where membership and role management properties are needed.
So I copied all the tables from the aspnet_db(database for mebership and roles) database to the database I created. Is this the usual practice that all follow? Now I have to copy the stored prodecures. How can I do that?
If there is a better way, please advise.
|
|
|
|
|
You can use command line utility aspnet_regSQL this will create all tables and SP in specified DataBase for Membership/role/SQLCachig/Profile management etc
Nobody is perfect i'm Nobody
|
|
|
|
|
Thanks a lot for the reply. That worked fine.
|
|
|
|
|
Can you discus what is different between Session State and Application state . and if your browser doesn`t have cookies , how do u store guest` information ? Thanks .
|
|
|
|
|
The application state is the place where to store information that has to be kept while the application runs. The application state is created during the first request and dies as soon as the IIS worker process is recycled.
The session state only exists during the browsersession of a user. The session is created during the first request in a browser session. The session state dies when the user is inactive for too long or if the user closes his/her browser.
If you disabled cookies it still stores session cookies which are deleted as soon as the browser is closed or when the sessions expires. There are however browsers that don't store cookies at all when you disable them, in that case it's not possible to create and keep a session alive. I suspect however that there are also browsers that store the sessionID in memory. This is possible because the session state is maintained on the server and not on the client.
Hope this helps a bit.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
Thanks you very much . It`s helpful for me . you are pro .
|
|
|
|
|
Hi
I posted this question previously but i didn't get any reply on this. In my web app, i am getting the error 'page cannot be displayed' when i go for pdf generation. i am using a third party tool viz. ActivePDF for pdf generation.
My scenario is like this
When the user request for a pdf to be generated, a separate thread is opened for the pdf generation process which is a background process. At the sametime, user will be able to work on other options in the app. When the user clicks for pdf generation, in a separate page, i am showing a gif 'Generation in process'. Sometimes, this page displays 'page cannot be displayed error'. At the end of the pdf generation, i am showing the pdf in another window. My settings are like this
debug=false
server.scripttimeout: almost one hour
executiontimeout : one hour
I thought this is timout error. so along with the pdf generation, i am pining the server from the page which shows the generation. but still it shows the error. no clueee at all. pls help
wilson
|
|
|
|
|
Hi,
I'm sure there must be an easy way of doing this, but assuming I've connected to a specific web service, how can I get the connected web service's URL?
Obviously I've set the reference when I've built my project and I could get the setting but I just think there must be a way of verifying from the web service itself, where it's being served from.
Thanks
|
|
|
|
|
There's the URL or Address property (I'm not sure about that). However, what are you exactly trying to achieve?
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
there are many ways to check server is up or not or the URL exists, like HttpWwebRequest , Ping
Nobody is perfect i'm Nobody
|
|
|
|
|
hi all,
i am using ASP.net 2003.
i want to print the content of a datagrid in a webform.
the datagrid conatin nearly 10 pages with page size 20.
how can i print all pages in a single button click??
i know to print the content in a div tag.Line feeeding is not working in this also.
wat should i do?
is der any reporting tool other than crystal reprot???
thanks in advance
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
My advice is to create a separate CSS file for media: print. You should configure the datagrid to display all rows at once instead of paging through it. It takes some fiddling, but that should work.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
hi,
Thanks for the reply.
sorry ,i didnt get this "My advice is to create a separate CSS file for media: print."
CSS file??
plz tell me in detail..
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Hi, I have posted this question before but the response was less than satisfactory. What does the following line of code actually do?
strSQL = String.Format("SELECT UserName FROM MembersInfotbl WHERE (email='{0}');", txtUserName.Text)
I had done some search on String.Format and some of the sites I visited said that the 1st value within the parentheses serves as the place holder for the 2nd value. So for example if k=String.Format( Page{0}, 1) the number 0 will be replaced by the 2nd number which is 1. That doesn't make sense when applied to the line above, because then email='{0}' would become email= txtUserName.text. Please correct me if I'm wrong. Thank you in advance for your help.
|
|
|
|
|
ASPnoob wrote: I had done some search on String.Format and some of the sites I visited said that the 1st value within the parentheses serves as the place holder for the 2nd value.
What you have got from the search is right.
But you have a small misunderstanding with that.
ASPnoob wrote: strSQL = String.Format("SELECT UserName FROM MembersInfotbl WHERE (email='{0}');", txtUserName.Text)
if the textbox has some value say XXX@YYY.COM, then
strSQL will be
SELECT UserName FROM MembersInfotbl WHERE (email='XXX@YYY.COM');
Regards,
Arun Kumar.A
|
|
|
|
|
The reason I was confused was because txtUserName.text is used for inputing a user's user name. The following was the code that I found for validating a user's Login.
Function DBAuthenticate(ByVal strUsername As String, ByVal strPassword As String) As Integer
Dim bResult As Boolean = False
Dim objConn As New OleDbConnection(ConfigurationSettings.AppSettings("myDB"))
Dim strSQL As String
Dim strGoodPassword As String
Dim objCommand As New OleDbCommand
objCommand.Connection = objConn
strSQL = String.Format("SELECT p_w FROM myDB WHERE (email='{0}');", txtUserName.text)
objCommand.CommandText = strSQL
objCommand.CommandType = CommandType.Text
objConn.Open()
strGoodPassword = CType(objCommand.ExecuteScalar, String)
objConn.Close()
If Not strGoodPassword Is Nothing Then
If strGoodPassword = strPassword Then
bResult = True
Else
lblMessage.Text = "Invalid Login!"
lblMessage.Text &= " If you are not a member please click the above link to register."
End If
Else
lblMessage.Text = "Invalid Login!"
lblMessage.Text &= " If you are not a member please click the above link to register."
End If
Return bResult
End Function
Could you please explain the role of strSQL in this code? I am confused as to why it was used like that. Thank you in advance for your help.
|
|
|
|
|
hi,
the purpose of strSQL is to store the sql command string, which in this case will retrieve the field p_w from the table myDB and whose email is equal to the email address provided by the user.
the string.format function simply replaces {0} with the string from the textbox - txtUserName, which the user provided.
the otput of this will be same as :
strSQL = "SELECT p_w FROM myDB WHERE (email='" & txtUserName.text & "');"
you need this string because it tells the command object what to fetch from the database.
hope this helps.
regards
|
|
|
|