|
I have a gridview and have following columns:
<br />
<asp:TemplateField HeaderText="Test" ><br />
<ItemTemplate> <br />
<asp:TextBox ID="txtTest" runat="server" <br />
Width="200px" MaxLength="30" <br />
Text='<%# Eval("TestString") %>' <br />
/> <br />
</ItemTemplate><br />
</asp:TemplateField> <br />
<br />
<asp:TemplateField HeaderText="Click Here" ><br />
<ItemTemplate><br />
<br />
<asp:Button ID="cmd1" <br />
CommandName="cmd1" <br />
CommandArgument='<%# Container.DisplayIndex %>'<br />
Text="ClickHere" <br />
OnClientClick="openpage2(this);return false;" <br />
runat="server" /> <br />
<br />
</ItemTemplate><br />
</asp:TemplateField> <br />
<br />
a textbox and a command button.
OnClientClick of the command button i have opened a new page
Now i need to pass the value to the clicked row textbox from the new window.
Do anyone know how to acheive this
|
|
|
|
|
rprateek wrote:
OnClientClick of the command button i have opened a new page
You can Pass The GridView Row Index or Any ID that is identical with this row and send this as Query string while opening the page. And Read the data from that same id in next page.
|
|
|
|
|
thanks for the reply
how would i pass row index that's what is my question
|
|
|
|
|
|
Hello Everybody
I want to valid customer email address. What I have done so far is follows:
1. I have kept new customer details into my database
2. Also I have added a column (name emailValidation, data type bit) into customer table
3. Initially it will be 0
4. After validation it will be 1
What I want to do is:
1. After resistered I want to send an auto email to customer where I want to send a link to active his or her account.
2. When they click that link I want to change emailValidation column to 1
Please tell the best way to do it.
Thanks in Advance
Sarafarj
Sarfarj Ahmed
|
|
|
|
|
Create a guid or some other unique key you can associate with the email. Put that on the URL in the email you send, so when they click on it, you can look up the email address and mark it as validated.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thank you very much
it does make sense to me.
Sarfarj Ahmed
|
|
|
|
|
as i understood is:
1. Send Mail using coustomer email address including guid
2. Example: I have send an email to a customer where I have attached a url address
3. url addrss: http://www.mycompnay.co.uk/customeremailaddres/936DA01F-9ABD-4d9d-80C7-02AF85C822A8
my question is:
that url is not exists into my system. so how can i can valid customer email address
please tell me more about email varification
Sarfarj Ahmed
|
|
|
|
|
Sarfaraj Ahmed wrote: 3. url addrss: http://www.mycompnay.co.uk/customeremailaddres/936DA01F-9ABD-4d9d-80C7-02AF85C822A8
I think you can do like following :
Make the url like
http://www.mycompany.co.uk?custId=customer@mail.com&GUID=936DA01F-9ABD-4d9d-80C7-02AF85C822A8
While sending the Mail To Customer insert the mail id and Guid in DB or in a storage
CustID GUID
--------- ----------
customer@mail.com 936DA01F-9ABD-4d9d-80C7-02AF85C822A8
Now, When user Click on that url, he will comes to your sites, now you can retrieve CusID and GUID from query string. and validate with database if valid then you can also remove the entry from database too.
This is just my idea.
|
|
|
|
|
Thanks a lot.
I will follow the information.
If I get any problem I will let you know.
Thanks Again
Sarfarj Ahmed
|
|
|
|
|
Here is another suggestion. Read this[^] article. It talks about a different approach for user account verification.
|
|
|
|
|
I have seen this free .NET library that is designed for this very occasion-
http://www.sharewareconnection.com/-net-email-validation-library.htm[^]
It does a lot of different things so you should be able to make it work with your implementation. Try it out!
Ranjit Viswakumar
Professional Services Specialist
http://hostmysite.com/?utm_source=bb
|
|
|
|
|
Hi
I am not sure whether I am posting this in the right place, but I would like to know how I can use VB.Net ASP as an interface to copy word and WAV files from a folder on one server to a folder on another server.
Does anyone know how to do this?
Thanks
|
|
|
|
|
AndyASPVB wrote: VB.Net ASP
No such thing. VB.NET does ASP.NET, for which this is the forum. ASP is VBScript.
AndyASPVB wrote: o copy word and WAV files from a folder on one server to a folder on another server.
Well, that depends. If the server you're copying to is the server hosting the website, then you *could* do it that way, pretty easily.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
Hi
I am having problem with my gridview not holding its checked state when being paged back and forth. I have used the code given below, which I found from another website. The only difference being that I am using a sqldatasource, and I changed it to rebind to my gridview as soon below. However, despite this, it is not holding the checked state.
Private Sub RememberOldValues()
Dim categoryIDList As New ArrayList()
Dim index As Integer = -1
For Each row As GridViewRow In GridView1.Rows
index = CInt(GridView1.DataKeys(row.RowIndex).Value)
Dim result As Boolean = DirectCast(row.FindControl("CheckBox1"), CheckBox).Checked
If Session(CHECKED_ITEMS) IsNot Nothing Then
categoryIDList = DirectCast(Session(CHECKED_ITEMS), ArrayList)
End If
If result Then
If Not categoryIDList.Contains(index) Then
categoryIDList.Add(index)
End If
Else
categoryIDList.Remove(index)
End If
Next
If categoryIDList IsNot Nothing AndAlso categoryIDList.Count > 0 Then
Session(CHECKED_ITEMS) = categoryIDList
End If
End Sub
Private Sub RePopulateValues()
Dim categoryIDList As ArrayList = DirectCast(Session(CHECKED_ITEMS), ArrayList)
If categoryIDList IsNot Nothing AndAlso categoryIDList.Count > 0 Then
For Each row As GridViewRow In GridView1.Rows
Dim index As Integer = CInt(GridView1.DataKeys(row.RowIndex).Value)
If categoryIDList.Contains(index) Then
Dim myCheckBox As CheckBox = DirectCast(row.FindControl("CheckBox1"), CheckBox)
myCheckBox.Checked = True
End If
Next
End If
End Sub
Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As GridViewPageEventArgs)
RememberOldValues()
GridView1.PageIndex = e.NewPageIndex
GridView1.DataBind
RePopulateValues()
End Sub
My checkboxes are already disabled from user action because they are set by an image button I have on the gridview. Can you see what I need to change to keep the checked state when paging?
Thanks
|
|
|
|
|
Have you stepped through the code to see if the values are being stored, and what happens when the code attempts to set a checkbox ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
I think I know what's happening!
Running the code through debug in Visual Studio 2008, I noticed that the code is working, and checkbox is being re-set. However, what I have noticed, and what I believe is that the whole page is being posted back because the whole gridview is being repopulated after the pageindexchanging event has been fired.
Is there away round this? I must point out, I mustn't use JavaScript because the website is being hosted on a client where it is being switched off.
Thanks
|
|
|
|
|
I have about six columns, and what I am looking to do is when any one of the six columns has been sorted into ascending of decending order for that state to remain when the next column is being sorted into either ascending or decending order. However, it is not sorting on two columns I need, I need it over the 6 columns, and thus when each column is sorted its state needs to be maintained until the user has filled up the sort expression. The sort expression needs to be maintained over the paging of the gridview.
I have been given this code by a member:
Protected Sub GridView1_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GridView1.Sorting
Dim selectedColumn As String = e.SortExpression
Dim viewstateColumns As String
If ViewState("sortBLOCKED EXPRESSION Is Nothing Then
viewstateColumns = String.Empty
Else
viewstateColumns = ViewState("sortBLOCKED EXPRESSION.ToString()
End If
If viewstateColumns.IndexOf(",") >= 0 Then
viewstateColumns = String.Empty
ElseIf Not String.IsNullOrEmpty(viewstateColumns) Then
viewstateColumns = viewstateColumns & ","
End If
viewstateColumns = viewstateColumns & selectedColumn
e.SortExpression = viewstateColumns
ViewState("sortBLOCKED EXPRESSION = e.SortExpression
End Sub
Unfortunately, it doesn't sort on the first column and seems to work on only two columns, plus I am unsure how to create a sort expression to hold my sort order, which can be in any order (i.e. it is not sequential over columns of the 1,2,3, type, but could 2,1,3 , 5,1,6, etc)
So, can anyone help me, please?
Thanks
|
|
|
|
|
I have developed several n-tier web apps:
* business logic layer
* DALC
* presentation layer
As I understand, a Business Facade layer can go on top of the business logic layer - basically as an additional layer of abstraction. Is this correct?
How many projects have you worked on where you've used a Business Facade layer? What are the main variations of this architecture? What are the pros and cons of this architecture?
|
|
|
|
|
I think a more common layer is a Service Layer. Your domain (business logic) should be isolated from other layers. The first layer of isolation is the Data Access Layer, which abstracts your domain from the data store. The second layer of isolation is usually a Service Layer, or sometimes called the Application Layer. This layer is intended to isolate your domain from its consumers, presenting a simpler API to the world of consumers (presentation, other businesses, other departments, etc.) Some consider services to be part of the domain, and thats certainly a valid opinnion. The main goal is to provide a contract that the products that need to consume your domain can bind to, rather than binding directly to all the various business objects in your domain. This allows your domain and the consumers of it to vary as needed, without having broad repercussions when the domain needs to change in the face of changing business requirements.
|
|
|
|
|
Isn't a "Business Service Layer" the same thing as a "Service Facade"?
|
|
|
|
|
Not really. Services do provide a "facade", where a facade is a simplified API to a complex subsystem. However, services conform to a more strict set of rules, and are intended to be THE API, not a simplified API. Unlike a simple facade layer, which is just a simplification layer, the services in a service layer should conform to the following principles:
- formal contract
- loose coupling
- abstraction
- reusability
- autonomy
- statelessness
- discoverability
- composability
Conforming to those principles will maximize the long term maintainability of your project, keep layers loosly coupled, etc.
|
|
|
|
|
This is (possibly) just a quick one. I have a website set up with 3 roles, i want a user to be able to choose between 2 of these when registering (A and B for example), the third is the admin role. Is there anyways of adding this as a drop down list/radio button on the asp:creatuserwizard6
|
|
|
|
|
Hi all,
I am creating a type of control that is used to display fill-in-blank questions, the control will have a drop down list in the location of each blank with 4 options to choose from, like this
The elephant [is, are, us, we] a very big Mammal that [eat, eating, eats, ate] plants...
[is, are, us, we] = drop down list with 4 options that the student uses to choose the best answer.
The question is how to dynamically create drop down server controls AND position them in the correct place within the words of the paragraph?
Any ideas?
Thanks
And ever has it been that love knows not its own depth until the hour of separation
Mohammad Gdeisat
|
|
|
|