or
<%@ Page Language="VB" MasterPageFile="~/Master/master.master" AutoEventWireup="false" Inherits="xfers.test" ValidateRequest="false" Codebehind="test.aspx.vb" %> <asp:Content ID="Content1" ContentPlaceHolderID="MasterHolder" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> <style> .RadUpload .ruFakeInput { background-color: #dddddd; cursor:not-allowed; } .ruFileInput { cursor: pointer; } </style> <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" > <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadScriptManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="Radprogressmanager1" /> <telerik:AjaxUpdatedControl ControlID="RadProgressArea1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="Radprogressmanager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadProgressArea1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadCodeBlock1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="Radprogressmanager1" /> <telerik:AjaxUpdatedControl ControlID="RadProgressArea1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <div style="position:absolute;z-index:1000;top:50%;left:30%;bottom:50%;right:50%;margin:auto;"> <telerik:RadProgressManager id="Radprogressmanager1" runat="server" /> <telerik:RadProgressArea id="RadProgressArea1" runat="server" onclientprogressbarupdating="onClientProgressBarUpdating" /> </div> <br /> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <table align="center" cellpadding="0" cellspacing="0"> <tr> <td> <asp:Label ID="lblErrMsg" runat="server" Visible="false" ForeColor="Red" Font-Bold="true" /> <table cellspacing="0" cellpadding="4" align="center" class="odehilite"> <tr> <td align="right" nowrap="nowrap">Browse for your file: </td> <td> <telerik:radupload id="fUpload" runat="server" maxfileinputscount="1" EnableFileInputSkinning="false" ControlObjectsVisibility="None" EnableEmbeddedBaseStylesheet="true" InputSize="50" Width="475px" OverwriteExistingFiles="true" ReadOnlyFileInputs="true" allowedfileextensions=".txt,.doc,.docx,.xls,.xlsx,.pdf,.htm,.html,.asp,.aspx,.ppt,.pptx,.pps,.ppsx,.csv,.gif,.jpg,.zip,.dat,.mdb,.xml,.smf,.dbf,.jpeg" maxfilesize="1073741824" /> </td> </tr> <tr> <th colspan="2"> Image Validation </th> </tr> <tr> <td align="center" colspan="2" style="padding-bottom: 1px;"> <telerik:RadCaptcha ID="RadCaptcha1" runat="server" ErrorMessage="Incorrect validation text entered" EnableRefreshImage="true" ValidatedTextBoxID="txtValidateImage" ValidationGroup="SubmitFile" > <CaptchaImage ImageCssClass="imageClass" EnableCaptchaAudio="true" BackgroundNoise="High" LineNoise="Medium" TextChars="LettersAndNumbers" TextLength="6" RenderImageOnly="true" /> </telerik:RadCaptcha> </td> </tr> <tr> <td align="center" colspan="2" style="padding-bottom: 1px;"> Text from image: <asp:TextBox ID="txtValidateImage" runat="server" MaxLength="6" ValidationGroup="SubmitFile" Font-Names="'Segoe UI', Arial, sans-serif" Font-Size="12px" ToolTip="Validate image." /> </td> </tr> <tr> <td colspan="2" align="center" style="padding: 0 0 2px 0;" > <table width="80%" cellpadding="0"> <tr> <td align="center"> <asp:Button ID="btnSubmitFile" runat="server" Text="Send File" CausesValidation="true" UseSubmitBehavior="true" CssClass="RadUploadSubmit" ValidationGroup="SubmitFile" /> </td> <td align="center"> <asp:Button ID="btnReset" runat="server" Text="Reset" CausesValidation="false" CssClass="RadUploadSubmit" /> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <script type="text/javascript"> var prm = Sys.WebForms.PageRequestManager.getInstance(); var originalClientSubmit; if (!originalClientSubmit) { originalClientSubmit = Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler; } Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler = function (e) { if (!prm._postBackSettings.async) { originalClientSubmit.apply(this, [e]); } } //<![CDATA[ function onClientProgressBarUpdating(progressArea, args) { progressArea.updateHorizontalProgressBar(args.get_progressBarElement(), args.get_progressValue()); args.set_cancel(true); } //]]> function findValidator(validid) { if (typeof (Page_Validators) == "undefined") return; for (var i = 0; i < Page_Validators.length; i++) { var vld = Page_Validators[i]; var str = vld.id; if (str.search(validid) > -1) return vld; } } function ValidatetxtMsg(source, arguments) { if (arguments.Value.indexOf("<") == -1 && arguments.Value.indexOf(">") == -1) { arguments.IsValid = true; } else { arguments.IsValid = false; } } </script> </telerik:RadCodeBlock> </asp:Content> <telerik:GridTemplateColumn HeaderText="Zdjęcia" HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowFiltering="false">
<ItemTemplate>
<telerik:RadRotator runat="server" ID="itemsRotator" OnDataBinding="RadRotator_OnDataBinding" Height="128px"> <ItemTemplate> <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("zdjecie") %>' AutoAdjustImageControlSize="false" Width="128px" Height="128px" ResizeMode="Fit" ImageAlign="Middle"/> </ItemTemplate> </telerik:RadRotator> </ItemTemplate>
</telerik:GridTemplateColumn>protected void RadRotator_OnDataBinding(object sender, EventArgs e) { string tmp = obecnyitem["ProductID"].Text; RadRotator radrotator = (RadRotator)obecnyitem.FindControl("itemsRotator"); SqlConnection sqlconn = new SqlConnection(); sqlconn.ConnectionString = @"data source=UNDERGROUND\SQLEXPRESS;UID=sa;PWD=ds3236y;initial catalog=Products"; sqlconn.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = sqlconn; cmd.CommandText = "select count(1) from katalog_zdjecia where indeks = '" + tmp + "'"; int tmp1 = System.Convert.ToInt32(cmd.ExecuteScalar()); sqlconn.Close(); cmd.Dispose(); sqlconn.Dispose(); SqlDataSource sqldatsrc = new SqlDataSource(); sqldatsrc.ConnectionString = @"data source=UNDERGROUND\SQLEXPRESS;UID=sa;PWD=ds3236y;initial catalog=Products"; sqldatsrc.ProviderName = "System.Data.SqlClient"; sqldatsrc.SelectCommand = "select indeks, zdjecie from katalog_zdjecia where indeks = '" + tmp + "'"; radrotator.DataSource = sqldatsrc; if (tmp1 > 1) radrotator.RotatorType = RotatorType.Buttons; else radrotator.RotatorType = RotatorType.AutomaticAdvance; }<span style="text-decoration: underline; font-size: 12pt; font-family: cambria;">Text Text</span>
<tr> <td style="width:100%" colspan="3"> <telerik:RadGrid ID="rgGiroPayments" runat="server" OnNeedDataSource="rgGiroPayments_NeedDataSource" AllowMultiRowSelection="true"> <MasterTableView> <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldName="EntityKeyName" FieldAlias="Vendor" /> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="EntityKeyName" FieldAlias="Vednor" /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <Columns> <telerik:GridBoundColumn DataField="AP_InvoiceID" HeaderText="AP_InvoiceID" Display="false" UniqueName="AP_InvoiceID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="InvoiceNo" HeaderText="Invoice #" DataType="system.string" UniqueName="InvoiceNo" FilterControlWidth="75%" SortExpression="InvoiceNo" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="InvoiceDate" HeaderText="Date" FilterControlWidth="75%" UniqueName="InvoiceDate" DataFormatString="{0:d}" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EntityID" HeaderText="EntityID" Display="false" UniqueName="EntityID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EntityIKeyD" HeaderText="EntityIKeyD" Display="false" UniqueName="EntityIKeyD"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EntityKeyName" FilterControlWidth="75%" HeaderText="EntityKeyName" UniqueName="EntityKeyName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" Display="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="InvoiceCurrencyName" HeaderText="Currency" UniqueName="InvoiceCurrencyName" FilterControlWidth="50%" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" Display="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CurrencySymbol" HeaderText="Currency" UniqueName="CurrencySymbol" FilterControlWidth="50%" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="InvoiceAmount" HeaderText="Amount" UniqueName="InvoiceAmount" FilterControlWidth="50%" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="BalanceAmount" HeaderText="Due Amount" UniqueName="BalanceAmount" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"> </telerik:GridBoundColumn> <telerik:GridClientSelectColumn UniqueName="Select"> </telerik:GridClientSelectColumn> </Columns> </MasterTableView> <ClientSettings Selecting-AllowRowSelect="true"></ClientSettings> </telerik:RadGrid> </td> </tr> <tr> <td align="center"> <asp:Button ID="btnPayment" runat="server" Text="Make Payment" OnClick="btnPayment_Click" /> </td> </tr>
Dim sScript As String = "radopen('FileUpload.aspx?CusID=" & lID & "', 'InfoPopup');"ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "FileUpload", sScript, True)An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
|

My requirement is as follows:
1) In my Web Page I have link when user clicks the link, user should able to upload his desired image and create a simple avatar for it and at finally when user ends with creation of the Avatar and click on the submit, I should be able to save it in the database.
2) So that when the user visits the page next time, he should be able to see avatar that he has previously designed.
3) Will you please tell me where can I get the API or sample code that can be used in the c#.net.
Please help me in doing this, it’s very Urgent.
Thanks & Regards
--------------------------------------------------------
Aravinda Chary N
Manamai