Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

mark_me

@mark_me
About
Posts
101
Topics
43
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • HttpCompileException occurs at random times
    M mark_me

    Hi, I am getting System.Web.HttpCompileException from my application randomnly. it gets fixed randomnly too. sometimes i refresh the IIS and it starts working, other times, i change timestamp on the control mentioned in exception and my application starts working. My code looks like:

    Private utilityMethods As ASP.mywebsite_utilitymethods_ascx 'Declaration , This line is throwing error. Note this is global declaration of the reference

    after the above line i create the object and use it to call methods in the utilitymethods control. The Products page has this declaration. Sometimes when i make changes to Products page and copy it to the testbox, this exception starts happening: Please not that line 55 is the declaration line that i have copied above Message: System.Web.HttpCompileException: D:\MyWebsite\Products.ascx.vb(55): error BC30002: Type 'ASP.mywebsite_utilitymethods_ascx' is not defined. at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at Website.MyWebsite.RadTabStrip.RadMultiPage1_PageViewCreated(Object sender, RadMultiPageEventArgs e) in D:\Websites\RadTabStrip.ascx.vb:line 906 at Telerik.Web.UI.RadMultiPage.OnPageViewCreated(RadMultiPageEventArgs eventArgs) at Telerik.Web.UI.RadMultiPage.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at Telerik.Web.UI.RadPageViewCollection.Add(RadPageView pageView) at MyWebsite.RadTabStrip.AddPageView(RadTab tab) in website\RadTabStrip.ascx.vb:line 1074 at MyWebsite.RadTabStrip.Page_Load(Object sender, EventArgs e) in D:\Websites\RadUCTabStrip.ascx.vb:line 668 Please note that the application is working. This happens sometimes when i make changes to Products page. When this happens, i change timestamp on utility methods or radtabstip page and copy it over and it starts working. I know my statement is re

    ASP.NET database design windows-admin tools help

  • checkbox viewstate disable and checked changed
    M mark_me

    Hi, I needed to create some controls in itemdatabound(grid) coz the number of controls to be rendered was only known at item databound of grid. the controls needed to raise event so i added events at runtime. All was working fine until recently i was asked to have another view for those controls outside the grid. I managed to create the controls once again in pageload. but the treeview was having viewstate problems coz controls once loaded and then if changed , the viewstate for the previous controls was being assigned to current controls. I managed to solve this by disabling viewstate for all the controls but now i see that the checkbox checkedchanged event is raised only when it is checked. The reason being that on pageload , since the checkbox has no viewstate, so the default value being unchecked is considered changed only if checkbox is checked. The problem gets solved when i enable viewsate but i can't enable viewstate. Is there any work around for this issue... . can the viewstate be assigned values for a particular checkbox and then removed at a button click, because there is a save button and if i can clear viewstate values at click of that button then probably it would work. I have tried clearviewstate and its not working. Please provide help Thanks haseeb

    ASP.NET help css

  • Dynamically setting width of controls
    M mark_me

    Hello, I have some controls created at ItemDatabound. (created at itemdatabound because at item databound , i know which type of control to create). In these controls, i have a button which increases size according to its Text. i want to fix the size for all other controls based on size of this button but when i get the width of button, it gives me 0 pixels. Can anybody provide an idea on how to set the width for the rest of the controls. i have tried grid's pre render method but somehow i cant find any of the controls created in itemdatabound . Thanks Mark

    ASP.NET css json help tutorial

  • ItemTemplate can't find a control in placeholder
    M mark_me

    Hi, Thanks for replying. I am not sure on how to redraw the grid. i mean, i am not sure on which event to use for creating the controls, so that the controls are available for itemcommand. Can u please provide a bit more detail. Thanks again. Mark

    ASP.NET help design sysadmin

  • ItemTemplate can't find a control in placeholder
    M mark_me

    Hi, i have a problem retrieving a control that has been added at runtime into the place holder... Please provide help...

    <telerik:GridTemplateColumn HeaderText="Description" SortExpression="ProductName" UniqueName="ProductName2">
    <HeaderStyle HorizontalAlign="center" />
    <ItemStyle HorizontalAlign="Left" Width="700px" />
    <ItemTemplate>
    <table style="border:0px;" >
    <tr >
    <td style="border:0px;">
    <asp:Label id = "lblProductDescription" runat = "server" Text = '<%# Eval("ProductName") %>'></asp:Label>
    </td>
    </tr>
    <tr >
    <td style="border:0px;" ID ="tdAttributes" runat = "server">
    <asp:PlaceHolder id = "placeHolderAttributes" runat = "server" Visible = "false"></asp:PlaceHolder>
    </td>
    </tr>
    </table>
    </ItemTemplate>
    </telerik:GridTemplateColumn>

    Control is added in ItemDataBound as. This code works,

    </pre>
    'htmltable,row and cells are declared
    Select Case controltype
    Case ControlType.TEXTBOX 'Constants declared
    Dim textBox As Telerik.Web.UI.RadTextBox = New Telerik.Web.UI.RadTextBox
    textBox.ID = "MYCONTROL"
    tableCell.Controls.Add(textBox )
    Case ControlType.TEXTAREA
    Dim textBox As Telerik.Web.UI.RadTextBox = New Telerik.Web.UI.RadTextBox
    textBox.ID = "MYCONTROL"
    tableCell.Controls.Add(textBox )
    Case GlobalControls.UCFormFields.FormFieldTypes.CHECKBOX
    Case GlobalControls.UCFormFields.FormFieldTypes.DROPDOWNLIST
    End Select
    thisHtmlTable.Rows.Insert(0, thisTableRow)
    thisTableRow.Cells.Add(tableCell)
    thisTableRow.Visible = True
    thisHtmlTable.Rows.Insert(thisHtmlTable.Rows.Count, thisTableRow)

    Dim placeHolder As PlaceHolder
    placeHolder = gridItem.FindControl("placeHolderAttributes")
    placeHolder.Controls.Add(thisHtmlTable)
    placeHolder.Visible = True

    In item command , i want to retrieve the control, i can switch between the controls if i retrieve the placeholder... my problem is that in itemcommand, i can retrieve the Placeholder but when i try pla

    ASP.NET help design sysadmin

  • GridDataitem retrival issue
    M mark_me

    Hi, I have an editformtemplate in a grid. The edit form contains 2 radiobuttons along with other controls. During itemdatabound , i convert the values of this column in grid to yes/no. Now on itemdatabound , when the form goes into edit mode i want to get the yes/no value and after converting to true/false want to populate radiobuttons. I am having problem retrieving the Cell data from the grid in edit mode. The exception is: Telerik.Web.UI.GridNotSupportedException: Item in insert mode does implement indexer only when the edit form is autogenerated at Telerik.Web.UI.GridEditFormInsertItem.get_Item(String columnUniqueName) Code:

    'ItemDatabound code snippet

    Select Case e.Item.ItemType
    
                    Case Telerik.Web.UI.GridItemType.Item, GridItemType.AlternatingItem
    
                        Dim item As Telerik.Web.UI.GridDataItem = e.Item
                        'display Yes/No instead of flag 1,0
                        If CType(item("IsNewProduct").Text, Boolean) = False Then
                            item("IsNewProduct").Text = "NO"
                        Else
                            item("IsNewProduct").Text = "YES"
                        End If
    
    
    
                    Case GridItemType.EditFormItem 'inside template edit form 
    
                        If e.Item.IsInEditMode Then
    
                            'populate controsl on  template edit form
                            Dim item As Telerik.Web.UI.GridEditableItem = e.Item
                            Dim editFormItem As GridEditFormItem = CType(e.Item, GridEditFormItem)
    
                            'Below line throws error, i am trying to retrieve yes, no and chose the correct radiobutton accordingly
                            Dim IsNewProductValue As String = CType(item("IsNewProduct").Text, String) 
                           'Exception is : Telerik.Web.UI.GridNotSupportedException: Item in insert mode does implement indexer only
    		' when the edit form is autogenerated at Telerik.Web.UI.GridEditFormInsertItem.get\_Item(String columnUniqueName) 
    

    i have tried setting item as

    Dim editFormItem As GridEditFormItem = CType(e.Item, GridEditFormItem)
    Dim item As Telerik.Web.UI.GridEditableItem = Ctype(editFormItem.ParentItem,GridDataItem)

    but this also didnt work Please provide help in this regard. Thanks ... Regards

    ASP.NET help css design

  • Web user control , Grid edit item collapse .Cancel
    M mark_me

    Hi, i am trying to use a web control previously developed. The web control has been created a while ago and contains 4 -5 textboxes and an update button. The control validates all the data against specific regular expressions and displays a message if the data is invalid data otherwise stores in db. The control is working in 2-3 other pages. I want to re-use the same control but in a gridedittemplate. I can re-use the control and it seems to be working but the only problem is that if validation of data fails, the grid collapses (probably because it assumes that the function has completed. i want the grid to remain in expanded mode, until the value is saved... I am implementing my functionality as: in .ascx page (my parent page is a control too) , i have a grid with a template which defines the control as visible = false in itemcommand. i make the control visible , which works great but on update button of this child control i want the parent grid to remain expanded

    'Code from ItemCommand

    	Case Telerik.Web.UI.GridItemType.EditFormItem ' in template edit form 
                        Dim item As Telerik.Web.UI.GridEditFormItem = e.Item
                            lblError.Visible = True
                            Try                                
                                Select Case LCase(e.CommandName)
                                    Case "performinsert"
                                        'add new                                         
    
                                        Session("ProductAttribute") = attribute
                                        item.FindControl("AttributeControl").Visible = True 'the control that i make visible. 
                                        e.Canceled = True 'so that the control remains visible, 
    				'the control has some textboxes, validation and update button. on update button, this grid collapses to initial state.
    				'i dont want it to collapse
                                        Exit Sub
                                    Case "update"
                                        'TODO: implement update functionality
                                End Select
    

    An idea/ or code snippet on how to solve this issue will be appreciated.. Thanks and regards

    ASP.NET help css database design tutorial

  • JavaScript registering at PageLoad for User Control
    M mark_me

    hi, thanx for ur reply... if u mean to use something like this dim cs as scriptmanager = page.clientscript cs.RegisterClientScript(args) then this also doesn't work. otherwise can u please provide a sample code... Thanks ,

    ASP.NET javascript tools help

  • JavaScript registering at PageLoad for User Control
    M mark_me

    Hi, I have a tab strip (telerik), with 3 tabs. Each tab strip opens a separate Web Control. When i add javascript to first control's (pageload) on the first tab, the javascript works but when i add it in second or 3rd tab (user control page load),javascript doesnot render to page. (i cant see it in ViewSource) Please note that i cannot add javascript in the designer for page so am adding the script at runtime on page load. The javascript also works when added in Parent Page. It only doesnt work in 2nd,3rd tab controls. It starts working from 3rd tab when added on parent or first tab control. (and i am not allowed to add anything outside this 3rd tab control) My code for script is

    dim script as string = " function Check(){alert('hello');}"
    Page.ClientScript.RegisterClientScriptBlock(Me.GetType(),"mycustomScript",script,false)

    Also i have tried RegisterStartupScript. The controls contains Ajax (RadControls) and script manager is added to parent page.The Manager Proxy is added to each page separately. Please provide help in this regard Best Regards haseeb

    ASP.NET javascript tools help

  • Clearing header using Response
    M mark_me

    Thanks, i will try response.clearheaders . though havent tried it but i firmly believe that it should work Thanks again

    ASP.NET html tutorial

  • Clearing header using Response
    M mark_me

    Hi.. the response.clear erases html output but doesnot erase any headers. i need to clear whole page. according to MSDN The Clear method erases any buffered HTML output. However, the Clear method erases only the response body; it does not erase response headers. Can anybody provide some assistance on how to clear the header as well... Thanks Mark

    ASP.NET html tutorial

  • Web Service Reference in Asp.net (WSE 2.0)
    M mark_me

    Hi ,thanks.. It seems that i need to look into all config files... I will let you know if i am not able to solve the problem... Thanks Mark

    ASP.NET help csharp asp-net sysadmin

  • Web Service Reference in Asp.net (WSE 2.0)
    M mark_me

    Hmmm... , on my local machine i added the reference to dll (ie my dll) thru website->add reference, whereas on the server, i just placed my dll in bin folder because i thought that should be enuf. On my local machine, i didn't make any change to add service reference so i believe web.config should have not changed... Am not sure about settings file though... It seems that by adding reference thru website->add reference, asp.net on my local machine knows where to find the service reference files but when added to only bin, asp.net doesnot know whre to get service reference from ... Is there anyother way of adding reference on server? I have tried placing the files everywhere on server but it isn't working... I need to see the web.config file ... Thanks for replying

    ASP.NET help csharp asp-net sysadmin

  • Web Service Reference in Asp.net (WSE 2.0)
    M mark_me

    Hi, i have a windows services that uses a service reference to amazon web service. I have created a dll that actually has the service reference and the dll is called by my windows service. My windows service works fine. I also have a local asp.net application that uses the same dll and works great (Probably because dll and asp.net application are created on same machine). Recently, i moved the asp.net application to LAN Server. I copied the dll into bin folder. I also copied the service reference folder to bin folder and it turns out that the asp.net application is not using the service reference. It is calling my dll but the dll inturn isn't using the service reference. Can anybody please provide help on where should i copy the service reference folder or files. or wat approach i should take to solve this issue. I googled but it seems that i am not googling appropriate keywords. Any help, link etc will be highly appreciated Thanks Mark

    ASP.NET help csharp asp-net sysadmin

  • Menu Colour
    M mark_me

    thankyou

    ASP.NET css help tutorial

  • Menu Colour
    M mark_me

    Hi Sashidhar , sorry for interruption.. It would be nice if u give me an insight to how u created these reports. What tool did u use? Thanx

    ASP.NET css help tutorial

  • Could not load file or assembly 'MySql.Data, Version=5.2.3.0, Culture=neutral, PublicKeyToken
    M mark_me

    Thanx alot

    ASP.NET csharp asp-net database mysql sysadmin

  • Could not load file or assembly 'MySql.Data, Version=5.2.3.0, Culture=neutral, PublicKeyToken
    M mark_me

    Hi, I have an asp.net application on the local server. I had to make some changes to the code so i copied the website to my personal system and made the changes. I had to include mysql ado.net connector, as some retrieval needed to be done from mysql database. I installed mysql ado.net connector on my pc but haven't installed it on the server. Because of this , the asp.net site when deployed to server throws an error of an unrecognized assembly. Though , the solution is to install ado.net connector on the server... but i want to know if there is another way in which i only copy the dll file and it works (as is the case with windows application where dlls reside in bin folder)... Thanx in advance

    ASP.NET csharp asp-net database mysql sysadmin

  • Web Large Select Statements
    M mark_me

    thanks for replying. I have used the autocomplete ajax extender but by multiple word search i meant how would i implement a search so that it allows "Battery for laptop aspire 234" or may be "Battery Aspire 234". Again by autocorrect i meant that if somebody happens to type in Apsire(instead of aspire) how would i suggest aspire ...

    Web Development csharp asp-net database algorithms help

  • Web Large Select Statements
    M mark_me

    Thanks Abhishek, Your answers have always been a good help. Thanks again. I have another small question ... i searched for it but wasnt' able to find any good help. I am also trying to develop a multi word search which can perform autocorrect... Can u please provide an idea on how this is done or may be forward an article... Thankyou again

    Web Development csharp asp-net database algorithms help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups