If RadUpload1.UploadedFiles.Count = 0 Then
'Ceate SQL Connection & Open it
Dim objConn As New SqlConnection("Data Source=")
objConn.Open()
'Create a command object for the stored proc
Dim objCmd As New SqlCommand("a_", objConn)
objCmd.CommandType = Data.CommandType.StoredProcedure
objCmd.CommandText = "a_"
objCmd.Parameters.Add(New SqlParameter("@headline", Data.SqlDbType.VarChar, 255))
objCmd.Parameters("@headline").Value = txtheadline.Text
objCmd.Parameters.Add(New SqlParameter("@Name", Data.SqlDbType.VarChar, 100))
objCmd.Parameters("@Name").Value = "none.gif"
objCmd.ExecuteNonQuery()
objConn.Close()
Response.Redirect("page.aspx")
Else
For Each f As UploadedFile In RadUpload1.UploadedFiles
f.SaveAs("C:\folder\" & f.GetName, True)
Next
For Each file As UploadedFile In RadUpload1.UploadedFiles
Dim bytes(file.InputStream.Length) As Byte
file.InputStream.Read(bytes, 0, file.InputStream.Length)
'Ceate SQL Connection & Open it
Dim objConn As New SqlConnection("Data Source=")
objConn.Open()
'Create a command object for the stored proc
Dim objCmd As New SqlCommand("a_", objConn)
objCmd.CommandType = Data.CommandType.StoredProcedure
objCmd.CommandText = "a_"
objCmd.Parameters.Add(New SqlParameter("@headline", Data.SqlDbType.VarChar, 255))
objCmd.Parameters("@headline").Value = txtheadline.Text
objCmd.Parameters.Add(New SqlParameter("@Name", Data.SqlDbType.VarChar, 100))
objCmd.Parameters("@Name").Value = file.GetName
objCmd.ExecuteNonQuery()
objConn.Close()
Response.Redirect("page.aspx")
Next
End If
----------------------------------
Thanks in advance
J
We have a RadGrid which goes to edit mode on double-click. When I make changes, or does'nt make any changes, in the editable row, the update takes place after a confirm dialog.
Once the confirm dialog is removed, row remains in edit mode with no database update.
Note: RadGrid uses ObjectDataSource
Any help in this regard is highly appreciated
Regards,
Martin
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| <div> |
| <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"> |
| <asp:ListItem Value="test">Test</asp:ListItem> |
| <asp:ListItem>Test2</asp:ListItem> |
| </asp:DropDownList> |
| </div> |
| <asp:Button ID="Button1" runat="server" Text="Button" /> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="DropDownList1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="Button1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Web; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| public partial class _Default : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| protected void Button1_Click(object sender, EventArgs e) |
| { |
| string test = "test if we do a full postback"; |
| } |
| protected void Page_PreRender(object sender, EventArgs e) |
| { |
| this.Button1.Text = this.DropDownList1.Text; |
| } |
| } |
Hello Telerik,
I have RadComboBox and text box on user contorol edit form(ascx) inside rad grid.ComboBox is populating with load on demand method and evertyhing works ok.
But, what I want is to get selected value from ComboBox with client side API( OnClientSelectedIndexChanged="HandleEndChanging") and show it on text box.
But it doesn't work.
Identical example works fine on aspx page.
Is there any way to solve this situation?
Regards,
Dubravko