Showing posts with label Developer. Show all posts
Showing posts with label Developer. Show all posts

unterminated string literal in jQuery


Thursday, April 22, 2010

Issue: unterminated string literal

Solution :





Whenever, you use textarea control in your html code, and you try to fetch the textarea data using jquery, you will encounter this 'unterminated string literal' issue.

Main reason of this issue is, while entering text in textarea control, if you press enter for new line, thus newline character is created, which make this issue to happen.

Please read below to find the solution to this issue,

suppose your html code is

HTML Code

<tr>
            <td align="right">
                About RJ :
            </td>
            <td align="left">
                <asp:TextBox ID="txtaboutrj" runat="server" TextMode="MultiLine" Width="300" Height="100"></asp:TextBox>
            </td>
        </tr>

To avoid this issue to happen, what you have to do is, just append '.ToString().Replace(Environment.NewLine, "<br />")' to your control name in code behind, like shown below.

CodeBehind Code

txtaboutrj.Text.ToString().Replace(Environment.NewLine, "<br />")

This will replace newline character with HTML tag "<br />",


Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Asp.Net Developer
Indianic Infotech Ltd (India)
rajesh@indianic.com



How to integrate Nochex Payment Gateway in C# ?


Wednesday, December 16, 2009

Solution :

Step 1 : Create one project in visual studio, and add below code in the HTML code of default.aspx page.



<table class="productholder" border="0" cellpadding="10" cellspacing="0" width="600">
<tbody>
<tr>
<td valign="top">
<h1>
Micro Helicopter</h1>
<h2>
Super Cool remote control copter!</h2>
<p>
An absolute must for all gadget heads - this amazing remote control copter is the
business. Just like what Nochex does for your business – this beauty will take you
to another level. Be a chopper pilot!
</p>
</td>
<td valign="top">
<img src="http://www.ukgadgetsrus.com/images/productimage-copter.gif" alt="Helecopter"
height="138" width="137" /></td>
<td valign="top">
<span class="stock">In stock</span><br />
<span class="prices">RRP £59.99</span><br />
<span class="prices2">Our Price £39.99 </span>
<form action="https://www.nochex.com/nochex.dll/checkout" method="post">
<div align="center">
<input type="hidden" name="email" size="64" value="xyz@xyz.com">
<input type="hidden" name="amount" size="8" value="39.99">
<br>
<input type="hidden" name="logo" size="64">
<br>
<input type="hidden" name="returnurl" value="http://localhost:1856/Nochex%20Payment%20Gateway%20Example/default.aspx" />
<input name="image" type="image" src="http://support.nochex.com/web/images/cardsboth2.gif"
alt="I accept payment using NOCHEX" />
</div>
</form>
</td>
</tr>
</tbody>
</table>



Step 2 : In the code you need to change the email value to your account email id, please replace that.

Step 3 : Set value of amount, logo and returnurl according to your product details.

Step 4 : thats it, you have done with payment integration.

Step 5 : Just select visa option for example and carry on with this credit card : 4111111111111111 and set issue number to 12 and Security number to 123.

Step 6 : Continue with the payment, after doing payment successfull, nochex website will return you to your return url.

Step 7 : Such a simple way to integrate Nochex payment gateway.

Step 8 : if you are satisfied with my explaination above, please put comment for me or if you feel any difficulties please put question as comment, i will reply to your question.

Please find Demo below

Merchant Payment Demo
http://www.ukgadgetsrus.com/merchant-payment-page.html

Seller Payment Demo
http://www.ukgadgetsrus.com/seller-payment-page.html


Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Asp.Net Developer
Indianic Infotech Ltd (India)
rajesh@indianic.com

How to align two div in same row ?


Tuesday, December 1, 2009

This is one of the Issue which make developer to pull His/Her Hair,

To align two div in same row, is really very simple, after you know, how it is done.

See the Demo below,

Code :
<div>Rajesh</div><div>Singh</div>


Output :
Rajesh
Singh


Solution to this Problem,

Code :
<div style="float:left;">Rajesh</div><div>Singh</div>


Output :
RajeshSingh


Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Asp.Net Developer
Indianic Infotech Ltd (India)
rajesh@indianic.com

How to upload zip file on blogger ?


Monday, October 26, 2009

Answer :

you can't upload any file directly to your blog.but you can achive this by indirectly, Please

read to find simple and free method to upload zip file on blogger.


Create account in this site :

http://www.4shared.com/signup.jsp


Just enter your email address and click on signup with FREE account

Then a virtual directory will be appered in front of you

http://www.4shared.com/account/dir/22327988/fd9c2607/sharing.html?rnd=46


Below you can see, upload file option, you can use that and upload your zip,image or any file
which you wanted, the user should download from your blog.

After uploading that file, you will see that file will appeared in the virtual directory.
then to get download link, you just click on download icon shown at the end of your file in

that virtual directory.

After clicking on that link, you will find this page

http://www.4shared.com/file/143676923/93c0c852/paypal_credit_card_processing_payment_gateway.html?signout=1


click on download, dont worry, the download will not start, this is to get download link.

after clicking on download button, you will see this page, counting download time in

decremently..

http://www.4shared.com/get/143676923/93c0c852/paypal_credit_card_processing_payment_gateway.html


then right click on this link "Click here to download this file" and click on "copy link

location".

open notepad and paste copied link.

i.e copied link ->


http://dc170.4shared.com/download/143676923/93c0c852/paypal_credit_card_processing_payment_gateway.zip?tsid=20091026-010849-1eccccca



How to use this download link in your blog

use this HTML code in your blog

&lt;a id="downloadid" src="http://dc170.4shared.com/download/143676923/93c0c852/paypal_credit_card_processing_payment_gateway.zip?tsid=20091026-010849-1eccccca" &gt;Download Source Code&lt;/a&gt;


when the user will click on this download link, the download will start from your blog without

visiting to other site.

Click here to see Demo


Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Asp.Net Developer
Indianic Infotech Ltd (India)
rajesh@indianic.com