|
Hi all
I have a datagrid, which holds item name, item price, and its image(all from SQL Server database), what I need is when the user clicks on the image, I need the (id) for the item to be carried to the new page where I want to show more details about the item (expiry date, ...)
give me a sample code please..
regards
|
|
|
|
|
Hi All,
Can any one help me in the coding of IPN (Instant Payment Notification) for Paypal. I want to update my database with the help of a variable named "custom". I send Order_ID in that variable in the FORM. In IPN Email I found its value is correct as I send. But When I tried to UPdate my Database with the Help of that variable I found that its value is 0. In IPN Page Load Event I tried to get its value with Request.QueryString("custom"), then I tried to Update DB, but its value was 0. Can any one help me. Paypal does not help in ur coding.
Thanks in Advance.
Khan Bangash
|
|
|
|
|
Hi All,
I had to change the color of a dropdownlist's selected item. So i made it an html control "<Select id=ctl name=ctl runat=server>".That was working fine.
But based on this dropdownlist i had to populate another dropdownlist.
I want the items of the second ddl to change based on the selection in the first ddl on the change event.
Can anyone help me out with this?
Thanks in advance.
Regards,
Jeeva
|
|
|
|
|
you can write onchange event for select in javascript
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
Thanks for the reply.
But, I want to call a server side funtion instead of writing a function in Java script.
Plz help me out.
Regards,
Jeeva
|
|
|
|
|
i have two web pages(login.aspx and account.aspx)i want to secure my account.aspx from unauthorised access.i used forms authentication as modified the web.config as follows:
<authentication mode="Forms">
<forms name="AuthCookie" loginurl="/login.aspx">
in the login button click event the codes are as follows:
if username.text="pradip" and password.text="pkc" then
FormsAuthentication.RedirectFromLoginPage(username.text,false)
else
labelmsg.text="invalid user name or password"
now my problem is that when ever i am directly accesing accout.aspx(without logging in),it is not automatically redirecting to login.aspx..
suoopse i have 10 webforms in my project out of which i want to make 5 web forms secure so that if any unauthorised user wants to access them,they will be automatically redirected to login.aspx ..how can i do this(i think that i have to check the cookie value "AuthCookie" in the page load event of the secure pages..but i dont know how to do it..
if i write request.cookies("AuthCookie").value is nothing then response.redirect("login.aspx").. in the page load events of the secure pages then also it is not redirecting to login.aspx..plz help me out this..its urgent ..
thanks in advance
pradip kishore
|
|
|
|
|
I prefer using Session variables rather than cookies because some users disable cookies of their navigators.
It's so easy to use !!
1. Authenticate event in the login page :
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)<br />
{<br />
if ((username.text="pradip") && (password.text="pkc" ))<br />
Session["Authenticated"] = "Ok";<br />
}
2. on_Load event of every Secured page :
if (Session["Authenticated"].ToString() != "Ok")<br />
RedirectToLognPage().....
The novice.
|
|
|
|
|
hi novice
thanks for your vital support
do i have to use the forms authentication..or simple i set the cookie after the validation of the user credentials in the login form..? if i dont use the forms authentication,then how i can make the user to sign out while pressing sign out button..
please replay back soon..
thanks in advance
pradip kishore
|
|
|
|
|
In my example I used the authentication form of Visual Studio and its "Authenticate" event.
There's no use of cookies.
The novice.
|
|
|
|
|
from where would i get the authenticate form..is it built in or i have to design one..if built in..will you please tell me how to incorporate it into my project..???
please reply back soon
thanks in advance..
pradip kishore
|
|
|
|
|
i have two web pages(login.aspx and account.aspx)i want to secure my account.aspx from unauthorised access.i used forms authentication as modified the web.config as follows:
<configuration>
<authentication mode="Forms">
<forms name="AuthCookie" loginurl="/login.aspx">
in the login button click event the codes are as follows:
if username.text="pradip" and password.text="pkc" then
FormsAuthentication.RedirectFromLoginPage(username.text,false)
else
labelmsg.text="invalid user name or password"
now my problem is that when ever i am directly accesing accout.aspx(without logging in),it is not automatically redirecting to login.aspx..
suoopse i have 10 webforms in my project out of which i want to make 5 web forms secure so that if any unauthorised user wants to access them,they will be automatically redirected to login.aspx ..how can i do this(i think that i have to check the cookie value "AuthCookie" in the page load event of the secure pages..but i dont know how to do it..
if i write request.cookies("AuthCookie").value is nothing then response.redirect("login.aspx").. in the page load events of the secure pages then also it is not redirecting to login.aspx..plz help me out this..its urgent ..
thanks in advance
pradip kishore
|
|
|
|
|
put all the pages which you wanna have in 'Logged in ' area in configuration section of web.config as follows.
<location path="Home_Account.aspx">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
|
|
|
|
|
hi
thanks for your response
do you mean that i have to add as many location path in the web.config file as the no of secure pages i have...
can you please show me how to write it for 2 web pages(account.aspx,transaction.aspx) in the web.config file
thanks in advance
i m pradip kishore from india,working in vb.net & asp.net
|
|
|
|
|
respected sir
i hav made a datagrid and bind it to database.anyone can update and delete the records with the help of this grid.
now i hav to search the records.
for that i am opening a modal dialog box.and on the basis of search criteria
it shows the records in a grid in modal dialog.Here for the searched records i hav also given the functionality to update and delete.
i hav updated some of the records here.
upto this everything is working fine.
now when i m going to close modal dialog box(either by a back button or using browser) i want to bind the parent's grid by updated records.
i have tried to refresh parent and used this javascript function on
click of the back button.
function Closewindow()
{
opener.location.reload(true);
self.close();
}
but it only refreshes my parent window.
which is not my objective.
any suggetion
Ajay
|
|
|
|
|
I want to store data type Struct in java Script. same Struct in Java or C/ C++. But I don't know Javascript can create data type Struct. ?
You can help me. how can I do type data Struct in JavaScript same Struct in C or java.
Thank you.
Regards.
|
|
|
|
|
you can create a class on the fly in Javascript. You can use JSON to pass structs to javascript from C#, but you can't have a 1:1 relationship between structs in C# and classes in jscript.
A class and a struct are the same thing, in C++, and I don't think jscript supports structs, as such, just classes.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
|
this question is my interview question..
What is the meaning of share point and what is the use of it....
|
|
|
|
|
|
do u have idea about KMS company in pune
|
|
|
|
|
Hi All!
I have a problem with message box in ASP.NET. I want to show a message box which alert for user after function executed. I used a Script segment to implement but when Message Box is showed then that page's background have a white color, no controls on it.
Please help resolve this problem.
Thanks!
|
|
|
|
|
How are you showing a messagebox ? Is it with C#/VB.NET, or with javascript ? C#/VB will work, so long as you browse on the server. you need to use a javascript alert to make it work on the client side.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Use javascript
alert('Hello');
:->
Pavan Pareta
|
|
|
|
|
I have a small Access table that is connected to a Gridview on a page. One of the columns in the Access table is an OLEObject field that stores picture files within the database. I'm trying to connect that field to the Gridview so that it displays the pictures. In the Gridview I'm using a ImageField. The DataImageURLField is set to the Access field name. When it runs it does not display the pictures. What else am I missing?
|
|
|
|
|
DataImageURLField will output the field contents into the src attribute of the resulting tag. Its expecting a string, you're giving it a bunch of binary data. Check the API docs for it.
Images can't be sent to the client that way, you'd have to make the URL point to another aspx page (or web servicy type thing) that takes a request parameter and pulls the image data out the DB and returns it down the response stream to the client (obviously being sent as image/type as the content type). Or even better don't store the images in the DB, rather write them to disk with a sequential file name and insert that into the DB (or if they have to be in the DB use a caching mechanism unless you have some fat servers!)
That make sense?
|
|
|
|