|
|
hi guys pls help me wit this code below:
comm.CommandText = "select BrandID, Brand, ('Logo_Pics/'+BrandLogo) as BrandLogoFile from Brand";
SqlDataReader dr = comm.ExecuteReader();
DataList1.DataSource = dr;
DataList1.DataBind();
dr.Close();
this code is working fine which is to show the picture of the products into the datalist1.
now i am trying to make it so that when users click on the picture it would link them to another page.
does any one have any knowledge of this this pls share your ideas and views pls.
|
|
|
|
|
I dont know, what control u have used in DataList to display the Picture of the product.
You may use 'ImageButton' control for ur purpose & may use PostBackUrl property for navigating to another page on Clicking the Image.
Regards,
Jay
|
|
|
|
|
Hi,
I think you have used DataList control here, I am not familier with DataList, we actually use Data Repeater, the procedure to set the link is in data repeater:
<asp:repeater id="Repeater1" runat="server">
<itemtemplate>
" border="0" />
Sorry i want to suggest you, but i cant able to answer you correctly...............
bye
Exelio
Know is Drop, Unknown is ocean
|
|
|
|
|
Couple of ways to do this - simplest is to add an on click handler to each image in ItemDatabound....
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I have a problem caused by an earlier design of a program developed by an external vendor. We have an sms system that accepts request via URL parameters (Eg: http://internalserver/sms.aspx?hp=3453453+msg=testtest).
I am trying to make this a more user friendly experience and thus have came out with a webform that accepts a mobile number and the message. Whenever the user clicks on the "Send" button, I would do the followng:
1) Create the URL and initialise it accordingly. Eg: http://internalserver/sms.aspx?hp=3453453+msg=usersmessage
2) The webpage will then launch this url in a new browser window.
The problem is if a user would like to send multiple sms, a large number of new browser window will open which is not ideal. Is there a way in ASP.NET to execute a url without having to launch another browser window or redirect the current one.
Note: The earlier system cannot be changed.
|
|
|
|
|
Server.Execute(url, StringWriter);
You can than use StringWriter's ToString() method to get the generated HTML.
|
|
|
|
|
i am new to asp.net
in exception handlig can we create more than one try block
can we catch different error in one try catch blocks
plz help me
prasad.g
|
|
|
|
|
|
I need to convert the following code into .net. the existing code is in coldfusion and runs as a background process.
Can someone help me in converting this coldfusion code to .net code.
<code>
<CFPARAM NAME="ATTRIBUTES.JUSTIFY" DEFAULT="no">
<CFIF NOT ThisTag.HasEndTag>
<CFABORT SHOWERROR="You need to supply a closing <CF_FileWriteText> tag.">
</CFIF>
<CFIF ThisTag.ExecutionMode is "End">
<!--- If it has <pre> or <code> tags, just leave the whole page alone!! --->
<!--- When CF reg expressions have non-greedy searching, I'll deal with this more intelligently --->
<CFIF REFindNoCase("<pre>|<code>", ThisTag.GeneratedContent) EQ 0>
<!--- Replace whitespace between CR/LFs with a single CF/LF --->
<!--- That fixes almost all of the major whitespace --->
<CFSET ThisTag.GeneratedContent = REReplace(ThisTag.GeneratedContent, "[#Chr(13)##Chr(10)#]+[[:space:]]*[#Chr(13)##Chr(10)#]+", "#Chr(13)##Chr(10)#", "ALL")>
<!--- If JUSTIFYing, remove whitespace at beginning of each line --->
<CFSET ATTRIBUTES.JUSTIFY = ucase(ATTRIBUTES.JUSTIFY)>
<CFIF ATTRIBUTES.JUSTIFY EQ "Y" OR ATTRIBUTES.JUSTIFY EQ "YES">
<CFSET ThisTag.GeneratedContent = REReplace(ThisTag.GeneratedContent, "[#Chr(13)##Chr(10)#][[:space:]]*", "#Chr(13)##Chr(10)#", "ALL")>
</CFIF>
</CFIF>
</CFIF>
<CFSETTING ENABLECFOUTPUTONLY="NO">
</code>
Thank you in advance.
Sudip
-- modified at 3:40 Thursday 7th September, 2006
|
|
|
|
|
+ "Help" is a useless title, see Chris's golden rules[^].
+ Cannot give you a direct anwser as I have no idea about ColdFusion, sorry, but the migration site[^] may give some ideas.
|
|
|
|
|
|
|
HI Satips,
I got the Framwork . Need the documentation.
|
|
|
|
|
Do you find anything ?
AUS Enrique Ferreyra
(Pachu)
|
|
|
|
|
There is one in java :
http://www.jpos.org/
|
|
|
|
|
I am pretty new to ASP.net and I am trying to write a login page that uses forms authentication.
I keep getting an error in my formsAuthentication when trying to set my cookie and redirect to the previous page. Please see my code:
formsauthentication.redirectfromloginpage(pstrUserId, False)
Errors says: formsauthentication not declared!
Here is my webconfig:
<authentication mode="Forms">
<forms name="AuthCookie" loginurl="login.aspx">
Help
|
|
|
|
|
Use like this in ur web.config,
<authentication mode="Forms">
<forms name="AuthCookie" loginurl="Login.aspx" defaulturl="Default.aspx" timeout="60" protection="All" cookieless="AutoDetect">
</authentication>
You'll also need to modify the authorization section of the Web.config file:
<authorization>
<deny users="?" />
</authorization>
ASP.NET 2.0
-- modified at 0:53 Thursday 7th September, 2006
Regards,
Jay
|
|
|
|
|
Hi ...
I am preparing ASP.net page and on page load I am storing all user name in Data view. Now when user clicks on asp button to check whether this user is available or not I am calling java script to open a popup window with dynamic message. This window needs to be open with query string icount which is my view.count value.
How I can pass my server control value to java script?
Code is as below
Class
Public icount as integer
On Page Load…
GetUserName() /* this will bring all username and store in session*/
Me.CmdCheckAvl.Attributes.Add("onClick", "return bValidateUserName(icount);")
On Click of button…
Dim UserNameVw As New DataView=Session("UserName")
UserNameVw.RowFilter = "UserName=" & Me.TxtUserName.Text
icount = UserNameVw.Count
JavaScript in include file is as below
function bValidateUserName(icount)
{
if(ISNull("TxtUserName") == true)
{
alert("Please provide User Name first");
return false;
}
else
{
window.open("UserExists.aspx"?UserAvl=icount,null,"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
}
return true;
}
Amit
|
|
|
|
|
Just a small Note...
As soon as i hard code my value in page load Attribute.Add it works fine....
On Page Load…
GetUserName() /* this will bring all username and store in session*/
Me.CmdCheckAvl.Attributes.Add("onClick", "return bValidateUserName(1);")
Humm....I am confused? Please help me...or let me know some workaround to solve this probelm....
Thanks for your time and effort...
Cheers
Amit
|
|
|
|
|
You can populate icount variable and do something like:
Me.CmdCheckAvl.Attributes.Add("onClick", "return bValidateUserName(" & icount & ");")
|
|
|
|
|
i will try and will update you. Thanks for your reply.
Amit
|
|
|
|
|
Hi
Thanks for your reply. and i am able to open new window. But it does not solve my problem...
1) On click of button, I want to invoke java script with a parameter.
2) Java script will open new window with parameter value.
3) And parameter value will be calculated at server on click of same go button.
So my seq would be 1 -3 and 2 step.
and currently it is doing 1-2-3 so everytime parameter value is zero
Please help me.
Amit
|
|
|
|
|
Hi,
in our ASP.Net Application how can we find/restrict a user so that he does not work on the same application from different browser windows.
thanks and regards,
Deepak Surana
|
|
|
|
|
The link[^] can give you some ideas.
|
|
|
|