<html>
<head>
<title>HTML Sms Api By great 'Vaibhav Maheshwari' </title>
<script type="text/javascript">
function loadIframe(iframeName, url) {
if ( window.frames[iframeName] ) {
window.frames[iframeName].location = url;
return false;
}
return true;
}
</script>
<style type ="text/css">
iframe{
visiblity:hidden;
}
</style>
</head>
<body>
<a href="http://ubaid.tk/sms/sms.aspx?uid=ur_mobile_no&pwd=ur_mobile_password&msg=ur_message&phone=to_whom_u_wannasend_to&provider=way2sms" onclick="return loadIframe('ifrm', this.href)" >Send Sms</a>
</form>
<iframe style="visibility:hidden;" name="ifrm" id="ifrm" style="visiblity:hidden;" frameborder="1">Your browser doesn't support iframes.</iframe>
</body>
</html>
Just Replace the details in this section of your html file. 'uid=ur_mobile_no&pwd=ur_mobile_password&msg=ur_message&phone=to_whom_u_wannasend_to;' . I hope u like the code . Will be posting ...
HTML & Javascript Way2Sms Api.....
This is the thing.... I Have only used html and javascript 2 authenticate the way2sms servers . Actually the whole thing is due to ubaid.tk servers which have been configured by me . you can send the sms from ur website to any mobile . Here is the code enjoy...
Create Thumbnail Of A Image C#
| ||||
Method 1: In this method, we are going to use Size Structure class library. It is a .NET class library structure, stores an ordered pair of integers, normally the width and height of a rectangle. By using this Size Structure we are going to scale the original image, to its appropriate thumbnail size without any disturbances in the quality of the thumbnail image. Size structure class library is available in System.Drawing namespace. To achieve this, we have a write a general method called ‘NewImageSize’. This method takes 3 parameters such as the original height, original width of the original image and the target thumbnail size you want to resize the original image. | ||||
| ||||
By passing those parameters, the above method will be proportionately scale the original image and returns the exact size of the thumbnail. We can use this new size to create the thumbnail images and store it in the server. In the click event of the Upload button, write the following code. | ||||
| ||||
Here we take the image path from the FileUpload control and save the original image inside “Images” folder. Then we declare another path to save the thumbnail image. | ||||
| ||||
Method 2: The second method is by using the GetThumbnailImage method of the Image class. This method returns the thumbnail image for the given original image. The syntax for this method is
The GetThumbnailImage method takes 4 parameters such as the width of the thumbnail, height of the thumbnail image in pixels, an unused delegate and a handle or pointer that must be always Zero. This method retrieves the original image, creates a thumbnail by scaling the original image. To create thumbnail by this method, first we to have to create a dummy delegate function, which always return false value. The syntax for the delegate function is as follows
Then in the Upload button’s click event write the following code.
By using the FileUpload control’s Save method, we store the original image in the Server. Then we are creating a CallBack delegate by using GetThumbnailImageAbort method. This method provides a callback to the Delegate ThumbnailCallback, when the GetThumbnailImage stops its execution in a premature state. If this happens it will return a true value else it will return always false. Might be it is beyond the scope of this article, we shall leave it here. Next we are create 2 Image objects such as TargetImage and Thumbnail. The first one TargetImage is to retrieve the original Image and the second Thumbnail is to create Thumbnail Image. Call the GetThumbnailImage method of the Thumbnail object to create a thumbnail image by passing the parameters such as width, height, dummy delegate callback and a handle with Zero value. By calling the Save method of the Thumbnail Image object, we can create thumbnail. Finally we call the Dispose method, to release the resources used by our Image objects. Point to Remember: If you look carefully in the above block of codes in both the methods, we are creating the all Image objects within a ‘using’ statement. What does this really do? The answer is simple. The using statement ensures that Dispose method is called without failure. Eventhough we don’t call Dispose explicitly, it is enough to enclose the statement with the using statement. The purpose of using it here is that we create Image objects and access Images that is stored in the server location. So after using the Images, if do not release it completely than it will create some Exceptions. In other case, if an Exception occurs in intermediate of the Image processing, then the .NET framework cannot release the resources used by the Image object. It will raise an Exception as follows ”The process cannot access the file because it is being used by another process.” So when you enclose the Image objects between using statement, then the Images and other files used within the using statement block will be released perfectly even though exception is raised. So we always recommend you to use using statement. The information provided in this article is only simple methods of creating thumbnail images at run-time or on fly. But there can be other methods, which will create thumbnail with simple technique and excellent quality. So we request our readers to provide them to us, so as to help other novice Asp.Net developers. |
Subscribe to:
Posts (Atom)