|
|
while asking some question in this forum , you should be more specific on you questions .
asif_3 wrote: ust tell me what we need to do to create contact page?
There is many way to create contat page. but you should be specific that what you need rathere that asking some one in this way .
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
I can't really answer that, because I'm not even sure what you mean by contact page ( that is, its just a page, it may well send mail using the mail server on the server end, but it still seems trivial to me ). It makes more sense for you to tell us what you tried, what you want it to do, etc.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have two dropdown and a gridview, i am getting the result in Gridview by selecting both the dropdown, I want to know how we can Navigate from the Gridview Data to the Gridview or any static page, each data should have different link. and link page should display the details of the data which we are selecting from the data base.
Can Any body Fix this Problem!
|
|
|
|
|
I have no idea what you're asking. You want links in the grid view to navigate to different pages ? Render links in the rows to the pages you want. You want something different, then please try to explain it better.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I got the data in the gridview from database assume i have 5 rows.
in that each row should go to a separate url(should have link) or with same page different data i tried it i am getting the same page again n again
|
|
|
|
|
Do what I said - render URLs in your grid view based on the content of the data in each row. I assume the URL you want relates to the row data in some way ? The obvious way is that query string parameter is set according to the data in the row.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
you can use GridViewRow and a select the data to can pass it to different page on link click. for any link you can use Gridview Template Field.
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
I'm developing an e-commerce web-based system & have problem in Shopping Cart part. i.e. update quantity & delete item from cart. This is code-behind for my Cart.aspx.
<pre>
'other code above
Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting
cart.DeleteItem(e.RowIndex) 'error here
GridView1.DataBind()
End Sub
Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
GridView1.EditIndex = e.NewEditIndex
GridView1.DataBind()
End Sub
Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating
Dim cell As DataControlFieldCell
cell = GridView1.Rows(e.RowIndex).Controls(3)
Dim t As TextBox = cell.Controls(0)
Try
Dim q As Integer
q = Integer.Parse(t.Text)
cart.UpdateQuantity(e.RowIndex, q) 'error here
Catch ex As FormatException
e.Cancel = True
End Try
GridView1.EditIndex = -1
GridView1.DataBind()
End Sub
Protected Sub GridView1_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridView1.RowCancelingEdit
e.Cancel = True
GridView1.EditIndex = -1
GridView1.DataBind()
End Sub
'other code below
</pre>
The error saying that:
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Thanks for your help!
|
|
|
|
|
miss nadia wrote: cart.DeleteItem(e.RowIndex) 'error here
Where is that function ?
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
That function is in ShoppingClass class.
|
|
|
|
|
this is the function in ShoppingCart class.
<pre>
Imports Microsoft.VisualBasic
Imports System.Collections.Generic
Public Class ShoppingCart
Private _cart As List(Of CartItem)
Public Sub New()
_cart = New List(Of CartItem)()
End Sub
Public Function GetItems() As List(Of CartItem)
Return _cart
End Function
Public Sub AddItem(ByVal id As String, ByVal name As String, ByVal price As Decimal)
Dim itemFound As Boolean = False
For Each Item As CartItem In _cart
If Item.ID = id Then
Item.Quantity += 1
itemFound = True
End If
Next
If Not itemFound Then
Dim item As CartItem
item = New CartItem(id, name, price, 1)
_cart.Add(item)
End If
End Sub
Public Sub UpdateQuantity(ByVal index As Integer, ByVal quantity As Integer) 'update quantity function
Dim item As CartItem
item = _cart(index)
item.Quantity = quantity
End Sub
Public Sub DeleteItem(ByVal index As Integer) 'delete item function
_cart.RemoveAt(index)
End Sub
Public ReadOnly Property Count() As Integer
Get
Return _cart.Count
End Get
End Property
End Class
</pre>
|
|
|
|
|
If we like to took an inbox page of rediff or any other page login page will dispaly for any site.How we make it for an aspx page also.If a user took a page http://eSIMSys/chatpage.aspx the login page will dispaly after login only user can access the chatpage.How is it possible.We are using form authentication.
|
|
|
|
|
I *think* you're asking how to enforce login ? The way I do that, is to make all pages that are protected, derive from a base class which checks if the user is logged in, and, if not, redirect to the login page. I suspect if you're using built in stuff, there'd be a config setting for the login page and it would redirect, but I prefer to write code.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,
bellow code has this Error: cannot implicity convert type login to System.Web.UI.WebControls.Login
protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)<br />
{<br />
if (e.CurrentStepIndex == 0)<br />
{<br />
System.Web.UI.WebControls.Login l =((Login)Wizard1.FindControl("Login1"));<br />
<br />
if (Membership.ValidateUser(l.UserName, l.Password))<br />
{<br />
FormsAuthentication.SetAuthCookie(l.UserName, l.RememberMeSet);<br />
e.Cancel = false;<br />
}<br />
else<br />
{<br />
l.InstructionText = "";<br />
l.InstructionTextStyle.ForeColor = System.Drawing.Color.Red;<br />
e.Cancel = true;<br />
}<br />
}<br />
else<br />
{<br />
if (!User.Identity.IsAuthenticated)<br />
{<br />
e.Cancel = true;<br />
Wizard1.ActiveStepIndex = 0;<br />
}<br />
<br />
}<br />
}
How i can solve this error?
Thank you,
Hoda
|
|
|
|
|
WEll, it usually helps if you tell us what line has the error. In this case, tho, I think it's clear.
Saba02 wrote: System.Web.UI.WebControls.Login l =((Login)Wizard1.FindControl("Login1"));
In the first case you specify the full namespace of the control, in the second, you do not. Obviously you have another class called Login somewhere, and that is in scope, so you need to full scope the login control on the right, so the two sides both point to the same object, instead of two different objects with the same name.
Consider also renaming your Login class so this doesn't happen again.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
Following on from my other question, I have a GridView which is bound to a SqlDataSource. It has several pages. In my PageLoad() event handler I can get a count of how many pages are on the gridview by the GridView.PageCount property. If that's the case, I'd like to iterate through each page and find a row from the GridView.DataKeys property with a column matching a particular value and select the row.
I've tried iterating through each page by setting the GridView.PageIndex property and then getting the GridView.DataKeys property but the latter isn't updated - it only gets the first (displayed) page's set of values.
|
|
|
|
|
Have you tried looping through the rows after binding.
<br />
GridView1.DataBind()<br />
<br />
For Each row In GridView1.Rows()<br />
'Do whatever<br />
Next <br />
<br />
<div class="ForumSig">Don't you just hate coming up with something to put here?</div>
|
|
|
|
|
Hi
I have a GridView on my ASP.NET 2.0 page which I've populated from a SqlDataSource. It all works great but now I want to use the same page and pass the ID (or primary key value) into the page via a parameter. I want the Gridview to then select the entry with the corresponding ID in the GridView.
In other words, if I open the page without passing a parameter, the gridview shows the data as usual (I've used a select column which highlights the selected row).
If I pass a parameter in, I want the correct page in the GridView to be displayed along with the correct row highlighted.
Is this possible?
Thanks
|
|
|
|
|
Yes, this is possible. I would recommend using a Details View instead of a Grid View, for the simple reason that the Details View is designed to show 1 record whilst the Grid View is for many.
To do this, in the Grid View set the select function to something like Server.Transfer("DetailsViewPage.aspx?ID="+IDFieldFromGridView)
Then in in the Details View page, do:
<br />
If Request.QueryString("ID") = ""<br />
Server.Transfer("GridViewPage.aspx")<br />
End If<br />
<br />
'Pragmatically set params for Details View<br />
Don't you just hate coming up with something to put here?
|
|
|
|
|
I am trying a URL redirection by wrting a code in Application_BeginRequest
in global.asax and using a rule.xml file
Below is the scnerio
#1 user enters a path http://sitename/project/Article06/issue6
This particlar folder "Article06/issue6"is not on the vistual direcory or on website. In Application_BeginRequest i read this path and if the path is equal to Article06/issue6 i redirect him to some other page.
The code works fine when it is executed from visual studio. But when i deploy this in IIS it does'nt even go to Application_BeginRequest method of global.asax it gives me 404 error
Any idea why it is not working on IIS and how can I solve it
Regards,
Pavas
|
|
|
|
|
Sounds like your code is not running, is ASP.NET configured on the machine and the website properly configured ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have noticed that when you enter a path which do not exist on the virtual directory or website. It never comes to Applicaion_BeginRequest method.
Regards,
Pavas
|
|
|
|
|
Are you sure that the file extension you supplied are handled by ASP.NET worker process.
|
|
|
|
|
There was an issue with the IIS and asp.net setup...got it resolved..
sorry for the trouble
Regards,
Pavas
|
|
|
|