|
Hello,
would anyone tell me how to set PayPal BuyNow button control's notify_url ? I want to use different IPN notify url for different products.
Regards
Emran
|
|
|
|
|
hi, can anyone help me on this problem thats occurring. I created a forum and its like this .. www.ivanandsimone.com/Query/Home.aspx. Now the problem is this, when i enter in the home.aspx 3 imagebuttons of 3 different items are shown above the page for instance (mobile, computer and book). When someone click on a picture it will take him in its (item description) of that item.
at that point everything works well but when a person clicks the back button of the windows explorer from the taskbar .. the pictures will ramins the same (mobile, computer and book) but the sessions will be overwrited by other numbers.
I am using Sessions to store every picture (the 3 pictures) ID number and then send that ID number to the Item.aspx page. The Item.aspx page will then see the ID and from the database it will search for the information about that ID that the user chosen.
Now the code is this:
This is for the Page_Load
If Request.QueryString("ItemID") <> "" Then<br />
Session(ID) = Request.QueryString("ItemID")<br />
<br />
Response.Redirect("Item.aspx")<br />
End If<br />
<br />
If Not IsPostBack Then<br />
Try<br />
odcConn = New OleDbConnection(strConn)<br />
daMem = New OleDbDataAdapter("Select * From tblItems Order By ItemID Desc", odcConn)<br />
dsMem.Clear()<br />
daMem.Fill(dsMem, "tblItems")<br />
dgItems.SelectedIndex = -1<br />
dgItems.DataSource = dsMem.Tables("tblItems")<br />
dgItems.DataBind()<br />
odcConn.Close()<br />
Session("Num1") = Nothing<br />
Session("Num2") = Nothing<br />
Session("Num3") = Nothing<br />
FillCategories()<br />
Catch ex As Exception<br />
odcConn.Close()<br />
End Try<br />
End If<br />
<br />
ChooseItems()<br />
End Sub
So the sessions - Session("Num1") and the other 2 are the storeage that i told you. Now for the Image Picker of the ImageButtons I am using this code:
Private Sub ChooseItems()<br />
Dim strImage As String<br />
Dim strItem As String<br />
Dim daItem As OleDbDataAdapter<br />
Dim ds As New DataSet<br />
Dim i As Integer = 0<br />
<br />
Dim randNum As New Random<br />
Dim intNum As Integer = randNum.Next(0, 22)<br />
<br />
odcConn = New OleDbConnection(strConn)<br />
daItem = New OleDbDataAdapter("SELECT * FROM tblItems", odcConn)<br />
daItem.Fill(ds, "tblItems")<br />
<br />
Try<br />
strImage = ds.Tables("tblItems").Rows(intNum)("Image1")<br />
<br />
imgItem1.ImageUrl = strImage<br />
<br />
strItem = ds.Tables("tblItems").Rows(intNum)("Item")<br />
<br />
lblItem1.Text = "Item: " & strItem<br />
<br />
If Session("Num1") = Nothing Then<br />
Session("Num1") = ds.Tables("tblItems").Rows(intNum)("ItemID")<br />
End If<br />
Catch ex As Exception<br />
odcConn.Close()<br />
Exit Try<br />
End Try<br />
<br />
intNum = randNum.Next(0, 22)<br />
daItem = New OleDbDataAdapter("SELECT * FROM tblItems", odcConn)<br />
daItem.Fill(ds, "tblItems")<br />
<br />
Try<br />
strImage = ds.Tables("tblItems").Rows(intNum)("Image1")<br />
<br />
imgItem2.ImageUrl = strImage<br />
<br />
<br />
strItem = ds.Tables("tblItems").Rows(intNum)("Item")<br />
<br />
lblItem2.Text = "Item: " & strItem<br />
<br />
If Session("Num2") = Nothing Then<br />
Session("Num2") = ds.Tables("tblItems").Rows(intNum)("ItemID")<br />
End If<br />
Catch ex As Exception<br />
odcConn.Close()<br />
Exit Try<br />
End Try<br />
<br />
intNum = randNum.Next(0, 22)<br />
daItem = New OleDbDataAdapter("SELECT * FROM tblItems", odcConn)<br />
daItem.Fill(ds, "tblItems")<br />
<br />
Try<br />
strImage = ds.Tables("tblItems").Rows(intNum)("Image1")<br />
<br />
imgItem3.ImageUrl = strImage<br />
<br />
strItem = ds.Tables("tblItems").Rows(intNum)("Item")<br />
<br />
lblItem3.Text = "Item: " & strItem<br />
<br />
If Session("Num3") = Nothing Then<br />
Session("Num3") = ds.Tables("tblItems").Rows(intNum)("ItemID")<br />
End If<br />
Catch ex As Exception<br />
odcConn.Close()<br />
Exit Try<br />
End Try<br />
<br />
odcConn.Close()<br />
End Sub
Can anyone help me in this problem because I got a big headache trying to fix this problem all night!
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
that is a frequent problem with the back button, every time that the user press this button the page do nothing (postback or not postback), the solution is hide the address bar and forces the users to navigate back using a server hiperlink control from the page.
On the all htmls page write these head lines
...
These lines forces the explorer to reload all the images from the server
i Hope will be usefull for you
keep Learning and you never will be out of date...
|
|
|
|
|
I am VERY new to web development and have what is probably a simple question regarding SSL. (I have a lot of experience in VB, but not in web apps).
I have an SSL certificate installed on my windows 2003 server. What kind of code do I need to incorporate into my application to utilize the SSL? Is code necessary, or does IIS handle all that? Is there any code available?
I'm sure this stuff is second nature to you guys, but you gotta learn somewhere!
|
|
|
|
|
Hi to all,
How can I display when textbox losting the focus with asp.net validation controls?
I am having a ten textboxes(mandatory). I am using requirefield validator. This is working fine when I click the submit button.
I want to display the errormessage when the focus leaving from control(if textbox is empty).
Regards,
|
|
|
|
|
You just need to change the display property of the required field validator control to dynamic.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I already worked on that. But the result is nothing. By using this, validation should be fired. but it can't?
Can I change any changes to webuivalidation.js?
I am using asp.net1.1. and iis5.1
Regards,
|
|
|
|
|
P Bhasker wrote: I am using asp.net1.1. and iis5.1
me too! but there is no problem.
you just need to change the property or writing so that you can see what you want.
do this and run your program.when u leave the textbox blank,u will see what you want
|
|
|
|
|
i am new to asp.net now i want to know how to use the application state an session state
|
|
|
|
|
There are so many articles available on net about the same. one os them is this[^]
Best Regards,
Apurva Kaushal
|
|
|
|
|
I am new ,also, to both ASP and ASP.net and in both instances I am self taught. Nonetheless, let me try to explain what is and the usage of both session and application state. Application state refers to any data that you might want to share amongst (all)users while session state maintains the state for individual user. While values stored in the application state will remain until the application is restarted or deleted, session state values are removed and discared as soon as the user ends his/her session(either by logging off or closing the browser). A typical example of session state is a counter on a website which tells you "you are the Xth person visitng our site (whereby X respresent the number of visitors to the site since the application started). While session state will tell you "You're logged in as such "username" and have been on for the past X amount of minutes (per se).
To set/capture and access the values contained in specific state the following syntax can be used.
Session state (syntax)
Session["MySessionVar"] = "MyValue";
/*where by my value can be anything u want to use be it username, password(not advisable), userPreferences....and so on. */
//then you can assign it to a variable which you can use to access and print the value of Session value(s)
SessionAlias = Session["MySessionVar"];
//To output the value contained in your session can be
//written as (lets say used the login name as the session
//value).
Response.Write("You are currently logged-in as " + SessionAlias);
The application state (syntax) is quite same as the session syntax. The only difference is that instead of using keyword "Session" you use "Application".
I must admit that this is a very elementary explantion but I sincerely hope that it helps you to better understand the concept. Not to long ago I was exactly where you are now in learning ASP and ASP.net and though I have advanced somewhat, I still have a long way to go. The best way to learn these concepts and ideologies are to practice writing them. However if you are unfamiliar with their existence then there will be no inclination to learn them. As a novice programmer I've found out the best way to learn is to read as much source code as you can and anything that captures your attention you should write it down then find a season programmer and start questioning him away. Hopem this helps.
PS: I will stand corrected should any of the readers find my explanation is erroneous.
-- modified at 15:38 Thursday 11th January, 2007
Skan
Coding makes the world go round!!!
|
|
|
|
|
I have a database full of dates and events for a calendar. I can (and have, using ASP) created my own code to create and fill out a Calendar. Before I review my code and rewrite it using ASP.NET/VB.NET I want to make sure I can't use the Calendar control already provided. I need to have two views for this, the first looks like the basic calendar control but with a color code for repeating dates. Like say the Jan. 12th is Martin Luther King Jr. Day, I would like it's background yellow (basically have style="background-color:yellow" in the TD tag). The second need I have is to have a big calendar with actual text in the box, so on the 12th the text "Martin Luther King Jr. Day" would be in the box with the date. So the basic question is: Is there anyway to programmatically access the individual date cells?
|
|
|
|
|
RX Maverick wrote: Is there anyway to programmatically access the individual date cells?
There is. The ASP.NET Calendar control exposes an event called OnDayRender in which you can manipulate the look of individual day cells or add content based on the day. Here's a CP article[^] that uses OnDayRender. The article goes into some complexity - you might want to look up OnDayRender in MSDN too and look at the examples there.
|
|
|
|
|
That's a great article with a lot of good information but now I have a second problem. I would like to use this with AJAX but in doing so I can't have it in a form element. I understand it wants the for element to handle the postbacks and such but I don't need that all I need is regular links. So can I tell the calendar to not use postback/forms or should I just make my own system?
|
|
|
|
|
RX Maverick wrote: I would like to use this with AJAX but in doing so I can't have it in a form element
Really? I thought that could be done. You have the calendar in an UpdatePanel, which would be in a <form> element, right?
|
|
|
|
|
Hello,
I am trying to create a simple webpage which displays a image from a record in my mysql (v4) db. Im using asp.net c#.
I found the article on this site name "Storing Images in MySQL using ASP.NET" however I am really having trouble getting the example to compile.
Does anyone out there know of any other good examples or tutorials I can follow? Has anyone done this before that could give me some guidance?
Thanks for your time.
|
|
|
|
|
Hello tmoney101,
its very simple. Define a HttpHandler for drawing images, define it in your web.config file in httphandler section <httphandlers>... Read the image from your DB, give the right ContentType and send the image data with Response.BinaryWrite().
|
|
|
|
|
Hey thanks heaps for your reply. I have started to read up on those techniques you have given me, however I am unsure if that link you gave me points to a reference webpage? When i follow the link it takes me a safe2web page that has no coding!
Thanks again.
tmoney101
|
|
|
|
|
Sorry, that was only a signatur.
Here you can find samples about implementing simple IHttpHandler:
http://www.codeproject.com/aspnet/domainforward.asp
http://www.15seconds.com/issue/020417.htm
|
|
|
|
|
Hi!
I would like to thank Mike Elliott for his nice example and program for IE Tree View Web Control for ASP.NET 1.1 and Client Scripts Overriding to stop posting back.
It's great.
But, I got stuck to the following enhancements:-
1. How can I implement Expand All and Collapse All features to the tree?
2. Finding the node data that matches the user input into a text box and based on the matches found the hierarchy to these node should be expanded.
3. How to stop Mozilla or Safari browsers to posting back the page?
Thanks
Tonmoy Roy
|
|
|
|
|
Where is the article from Mike Elliot which explains IE tree View. I have been looking for an article of this nature for quite some time since I wanted to create a webpage which displays databases record (by topic) in a tree view. I had post a question asking how to do this but unfortunately did nto get a response. It would be greatly apprecaited if you can point me to Mike's article.
Skan
Coding makes the world go round!!!
|
|
|
|
|
|
HI
Guys can any one please let me know the considerations to be kept in mind while making data acces layer for ASP.NET Web application, reply me ASP,
Thankx in advance for ur replies.
|
|
|
|
|
King Shez wrote: reply me ASP
That's a sure way to have your message ignored.
Your question is a very broad one. Can you narrow it down a bit? What specifically are you having problems with?
|
|
|
|
|
Hello I need edit one field in gridview but I do not wish to use the standar button of update, I need that the field can be edit same that a checkbox and I need that when the user change of row this change update automatic without botton of update.
Thanks very much
|
|
|
|