Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
73 views

Hi All

Strange one this, if you goto www.weddingdazedirectory.co.uk I'll do my best to explain.

The left hand menu is a user control in a Masterpage

If you make a selection form the left hand menu, the page posts back, but nothing happens.

Now select Advice - Advertorials (I know some in=mages are missing) and make a selection from the left hand menu, you get some results.

Now go back to the home page and make a selection, it now works!

Does anyone have any idea as to what is going on?


The menu is dynamically generated, and I'm using the Item click to redirect to a landing page.
Protected Sub CategoryTree()
 
    'CategoryList
    Dim cl As New CoreData
    Dim cl_ds As Data.DataTable = cl.CategoryByCounty(0)
    With mnuCategory
        .Items.Clear()
        .DataSource = cl_ds
        .DataFieldID = "Category_ID"
        .DataFieldParentID = "ParentCategory_ID"
        .DataTextField = "Category"
        .DataValueField = "Category_ID"
        '.DataNavigateUrlField = "Link"
        .DataBind()
    End With
 
 
End Sub
 
 
Protected Sub mnuCategory_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles mnuCategory.ItemClick
 
    Dim Category_ID As Int32 = e.Item.Value
    Page.Response.Redirect("~/Display/County.aspx?Cat=" & Category_ID)
 
End Sub
Kate
Telerik team
 answered on 03 May 2012
3 answers
56 views

Hi,

In my ASP .NET application I use a tabpanel to let the user open multiple subject from a quickbar, like browser tabs but then inside my application. The content of the subjects is dynamically created server-side. To remain the viewstate of inactive tabpages I need to rebuild the content of the inactive tabpages every request again. When the user opens more subject very request to the server will take longer and longer because of this.

I'm looking for an advanced solution to save the viewstate of inactive tabpages over multiple requests on the active tabpage. When an inactive tabpage becomes active again I want to put the saved viewstate of this tabpage back in the viewstate of the whole page. This can give my application a performance boost when I do not need to rebuild every inactive tabpage on every request to the server.

 
I have red a lot about the ASP viewstate but I did not found a solution for this yet. Any suggestions how I can accomplish this?

Dimitar Terziev
Telerik team
 answered on 03 May 2012
9 answers
202 views
Hi All,

 I have set the rad editor to be in "Preview" mode only, however I still want to ability for users to resize the control, so I believed that this should be taken care of using EnableResize="true"

The resize functionality only seems to be enabled when there are multiple modes enabled. e.g. All, Preview + Design etc.

Any ideas on how to fix this?

Cheers,
Jonathan
Rumen
Telerik team
 answered on 03 May 2012
2 answers
114 views
Hi all

This is not a Telerik issue, I just need some pointers.

Using the examples in the help, I have distilled the problem down to the following code, ie no error trapps or validation controls.

I get the error - Value of type '1-dimensional array of Byte' cannot be converted to 'Byte'

On the 'bytes' in the ModelImageAdd function. Why is this, what am I missing?
Protected Sub btnUpload_Click(sender As Object, e As System.EventArgs) Handles btnUpload.Click
 
 
        BindValidResults()
 
 
    End Sub
 
 
    Protected Sub BindValidResults()
 
        If RadUpload1.UploadedFiles.Count > 0 Then
 
            For Each file As UploadedFile In RadUpload1.UploadedFiles
                Dim bytes(file.ContentLength - 1) As Byte
                file.InputStream.Read(bytes, 0, file.ContentLength)
                 
            Dim a As New Model
                a.ModelImageAdd(Model_ID, file.GetName(), bytes, Owner_GUID)
            Next
 
        End If
    End Sub


The function to save the image data looks like this:
Public Function ModelImageAdd(ByVal _Model_ID As String, _ImageName As String, ByVal _ImageData As Byte, ByVal _Owner As Guid) As Boolean
    Try
        Using sqlConn As New SqlConnection(ConfigurationManager.ConnectionStrings("cnModelDB").ToString)
            Using sqlCmd As New SqlCommand()
                With sqlCmd
                    .CommandType = CommandType.StoredProcedure
                    .CommandText = "ModelImageAdd"
                    .Connection = sqlConn
                    .Parameters.Add("@Model_ID", SqlDbType.Int).Value = _Model_ID
                    .Parameters.Add("@ImageName", SqlDbType.VarChar, 75).Value = _ImageName
                    .Parameters.Add("@ImageData", SqlDbType.Binary).Value = _ImageData
                    .Parameters.Add("@Owner", SqlDbType.UniqueIdentifier).Value = _Owner
                    .Parameters.Add("@ReturnValue", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
                    .Connection.Open()
                    .ExecuteScalar()
                End With
 
                If sqlCmd.Parameters("@ReturnValue").Value = 0 Then
                    ModelImageAdd = 1
                Else
                    ModelImageAdd = sqlCmd.Parameters("@ReturnValue").Value
                End If
            End Using
        End Using
    Catch ex As Exception
        ErrorLog.Log(String.Format("Model:ModelAdd(): {0}", ex.Message))
        Return False
    End Try
 
End Function
Andy Green
Top achievements
Rank 2
 answered on 03 May 2012
1 answer
75 views
hi there,

1) how can i get text from input box of RadUpload. server side only.
e.g string txt = control-Id.PostedFile.FileName.ToString();
2) as radUpload is read only, so is there any work around to assign/set text in input box. Server side only.

tx

Princy
Top achievements
Rank 2
 answered on 03 May 2012
2 answers
261 views
Hello, 
  I need to change buttons text when user clicks it, the button is in a listview
everything seems to be fine but the fact that its not showing on screen
this is part of  my code

<asp:ListView ID="TeachersList" runat="server"  OnItemCommand="ShowNumber_ItemCommand">


.
.
.

 

<ItemTemplate >

.
.
.

<asp:LinkButton ID="ShowNumberLinkButton" runat="server" CommandName="ShowNumber" CommandArgument='<%# Eval("UserID") %>' Text=" "></asp:LinkButton>
.
.
.


 

 

Protected Sub ShowNumber_ItemCommand(ByVal sender As Object, ByVal e As ListViewCommandEventArgs)

 

 

For Each row In TeachersList.Items

          For Each control In row.Controls

 

                if control.CommandArgument = UserID Then

                    control.Text = "bla bla"
.
.
.


Please help, thanks

 

Guy
Top achievements
Rank 1
 answered on 03 May 2012
1 answer
153 views
I have used textbox,label in all GridTemplateColumn's EditItemTemplate. I am unable to get the id of those controls when trying it in jquery.
I tried this method too.

var grid = $find("<%=Grid1.ClientID %>");
var masterTable = grid.get_masterTableView();
var row = masterTable.get_dataItems();
var button = row.findElement("controlname");

But I couldn't get the ID.

If the Grid is in ICGRadAjaxManager's updated control, will the above code work?

Thanks in advance

Vijay.
Shinu
Top achievements
Rank 2
 answered on 03 May 2012
1 answer
83 views
I find that in the raddatepicker if you manually type in the date and try to access what is in the object I get 01/01/0001 instead of what was typed in. Is there some setting to set to manual typing is allowed?
Richard
Top achievements
Rank 1
 answered on 02 May 2012
1 answer
69 views
Hi All,

In radgrid if I click on edit link it has to open a new window in browser (as per browser settings it may be new window or new tab in current browser window) edit page, and new page has to load my user control. What settings need to be done in UI....

Thanks & Regards,
Ramesh Sambari
Richard
Top achievements
Rank 1
 answered on 02 May 2012
0 answers
79 views
The scenario is that a user may be on page 4, clicks a link, decides it is the wrong link, then hits the backbutton. The sorted list and page should be maintained. I've tried enabling viewstate, and even storing the page index into the session and having it load on prerender (if not null). What is happening is that when I hit the back button, I get an error stating that the page has expired. What is the normal practice for obtaining this effect and are there any suggestions as to why the page is expiring, preventing my ability to use the back button?
Jeremy
Top achievements
Rank 1
 asked on 02 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?