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
M

MalikRizwan

@MalikRizwan
About
Posts
48
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Best use of exception handling
    M MalikRizwan

    :laugh: yeahhh.. it won't go in catch block ever.

    **

    R A M

    **

    The Weird and The Wonderful ruby

  • Best use of exception handling
    M MalikRizwan

    here is another gem by my colleague. I believe he was drunk when he wrote this as I don't think he would do this in senses.

    Page executingPage = null;
    try
    {
    executingPage = HttpContext.Current.Handler as Page;
    }
    catch(InvalidCastException ex)
    {
    executingPage = HttpContext.Current.Handler as Page;
    }

    **

    R A M

    **

    The Weird and The Wonderful ruby

  • Beware while using Japanese language
    M MalikRizwan

    There was this guy who joined our team as a trainee. Who, according to him, had enough knowledge of .NET specially exception handling..later on i found his code full of TRY CATCH literally on each line .. something like this.. int budgetAmount =0; try { budgetAmount = 10; }catch(Exception ex) { } try { if(budgetAmount==10) budgetAmount += (baselineAmount * actualAmount); }catch(Exception ex) { } and so on

    **

    R A M

    **

    The Weird and The Wonderful

  • Beware while using Japanese language
    M MalikRizwan

    I found this some one posted in ASP.NET questions today, What could be the possible reason to set same encoding with conditional statement?

    **

    R A M

    **

    The Weird and The Wonderful

  • Beware while using Japanese language
    M MalikRizwan

    if (lang == "Japanese")
    {
    msg.BodyEncoding = System.Text.Encoding.UTF8;
    msg.SubjectEncoding = System.Text.Encoding.UTF8;
    }
    else
    {
    msg.BodyEncoding = System.Text.Encoding.UTF8;
    msg.SubjectEncoding = System.Text.Encoding.UTF8;
    }

    **

    R A M

    **

    The Weird and The Wonderful

  • How to read a file completely?
    M MalikRizwan

    I understand.. but my point is will that read anything after first line as Object to read file is initiated EVERYTIME in loop

    **

    R A M

    **

    The Weird and The Wonderful ruby debugging help tutorial question

  • How to read a file completely?
    M MalikRizwan

    Loop should exit on first exception if there is no try block. I agree with you in this case it wouldn't stop excuting as it has a catch block. But I wonder if it will ever throw end of file exception? as everytime a new Object is created against physical file that would start reading file from start so there would be no end of file ever. but it could throw infinite loop exception though? Your thoughts?

    **

    R A M

    **

    The Weird and The Wonderful ruby debugging help tutorial question

  • Using Paging on Master-Details Repeater
    M MalikRizwan

    I want to implement Paging on Master Detail Layout but i dont know how it will work because i can only set one pageddatasource at a time for either master or child record... please help me

    **

    R A M

    **

    ASP.NET help

  • Nested repeaters Paging problem
    M MalikRizwan

    I have 2 Repeaters with ProductCategory and ProductDetail Architecture.. i.e master detail Wot i want to do is ... enable the paging as a whole rather than ProductCategory or ProductDetail .. Here is sample code for it strSQL = "SELECT ProductID, ShortDesc, LongDesc, SubCategoryID, PictureUrl, ProductCatID, DataSheetUrl " & _ " FROM dbo.Products ORDER BY ProductID" '& Request.QueryString("subid") strSqlMain = "SELECT ProductCatID, Description, SubCategoryID FROM dbo.ProductCategory Where SubCategoryID=" & Request.QueryString("subid") clsCon.MakeDataSet(strSQL, dsProduct) clsCon.MakeDataSet(strSqlMain, ds) ds.Tables(0).TableName = "Main" ds.Tables.Add(dsProduct.Tables(0).Copy()) ds.Tables(1).TableName = "Products" Dim str1(0) As String Dim str2(0) As String Dim dr As DataRelation = New DataRelation("ProductCat", ds.Tables("Main").Columns("ProductCatID"), ds.Tables("Products").Columns("ProductCatID"), False) ds.Relations.Add(dr) rptCategory.DataSource = ds rptCategory.DataBind() clsCon.sqlConnection.Close() And the ItemDataBound Event of Master Repeater is Protected Sub BindChild(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then If (CType(e.Item.DataItem, DataRowView).CreateChildView("ProductCat")).Count > 0 Then Dim rpt As Repeater = e.Item.Controls(3) Dim dsPaged As New PagedDataSource dsPaged.DataSource = (CType(e.Item.DataItem, DataRowView).CreateChildView("ProductCat")) dsPaged.AllowPaging = True dsPaged.PageSize = 7 dsPaged.CurrentPageIndex = CurrentPage lblCurrent.Text = "Page: " & (CurrentPage + 1).ToString & " of " & _ dsPaged.PageCount.ToString lblPrevious.Enabled = Not dsPaged.IsFirstPage lblNext.Enabled = Not dsPaged.IsLastPage rpt.DataSource = dsPaged rpt.DataBind() End If End If End Sub now problem is It makes the Paging enable on Product Repeater meanz .. if i have a Categories like CAT-A CAT-B,CAT-C and all of these categories has 10 items each .. then paging will work as first page will populate with 7 records of A,B,C, e

    ASP.NET design architecture help

  • Bind a data set in an HTML table
    M MalikRizwan

    You can use DataList for this purpose as and provide your data to be shown in ItemTemplate tag in html .. like this put it in ItemTemplate of DataList R A M

    Visual Basic question html help

  • Custom Web user Control
    M MalikRizwan

    Thanx alot minhpc_bk .. so nice of you ..**

    R A M

    **

    ASP.NET html design sysadmin security workspace

  • Custom Web user Control
    M MalikRizwan

    I m setting through code behind and value is not null when i set it to XMLDataSource property. It assigns the value correctly because i have checked through debugging. I think there is some problem with declaring the control .. isnt it?**

    R A M

    **

    ASP.NET html design sysadmin security workspace

  • Custom Web user Control
    M MalikRizwan

    I have a custom control with two properties and one overrided method render .. whenever i assign DataTable to one property i preserves it but when the render function is called its value is null here is my code using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; namespace Nav { /// /// Summary description for ucMenu /// [ToolboxData("<{0}:ucMenu runat=server>")] public class ucMenu : WebControl { DataTable _dtMenu; string _id; public ucMenu() { // // TODO: Add constructor logic here // //_dsMenu = new DataSet(); } public DataTable XMLDataSource { get { return (_dtMenu); } set { _dtMenu = value.Copy(); } } public string NavID { get { return (_id); } set { _id = value; } } protected override void Render(HtmlTextWriter writer) { writer.Write(" "); if (_dtMenu != null) { for (int i = 0; i < _dtMenu.Rows.Count; i++) { writer.Write("* [" + _dtMenu.Rows[i]["text"].ToString() + "]( + _dtMenu.Rows[i][) "); } } writer.Write(" "); writer.Flush(); base.Render(writer); } } } IN HTML i m embedding it as <MyBar:ucMenu ID="UcMenu1" runat="server" /> and in code behind protected ucMenu MyBar = new ucMenu(); on top of class can you please tell me why my datatable refernce to null in render even i have ref it to datatable from property**

    R A M

    **

    ASP.NET html design sysadmin security workspace

  • SQL SERVER Monitor
    M MalikRizwan

    I want to develop sqlserver monitor ,tunerand analyzer please can you guide me how can i do this .. just give me a guideline .. or any opensource lib and prj u know Features should include: Monitor SQL Server Hardware requirements are Utilization and Performance Monitor CPU, memory, and the I/O subsystem percentages Monitor disk operations (reads/writes) and network traffic Correlate system utilization with user connections and SQL code Diagnose Executed SQL Code Performance, Connections, and SQL Server Blocking Analyze and chart slow performing SQL statements and stored procedures Report the cost (Duration, CPU time, & disk reads/writes) of each statement etc etc**

    R A M

    **

    Visual Basic sysadmin performance database sql-server hardware

  • Audio Chat Server
    M MalikRizwan

    I want to implement Audio Chat Server in ASP.NET Can you please guide me in this regard like how can i implement what packages will be used or if there is any opensource chat server in .NET kindly tell me. and approx how much time it will take me to implement**

    R A M

    **

    ASP.NET csharp asp-net sysadmin tutorial question

  • Popup blocker window
    M MalikRizwan

    thanx alot Vuks .. i will get back to you if i face some problem in this script .. thanks again**

    R A M

    **

    ASP.NET

  • Popup blocker window
    M MalikRizwan

    I want to detect if the client browser is using popupblocker or not.. or is there any solution to popup a window regardless of that popblocker as Hotmail and yahoo shows popupwindow on deleteing of emails thanx in advance**

    R A M

    **

    Web Development

  • Popup blocker window
    M MalikRizwan

    I want to detect if the client browser is using popupblocker or not.. or is there any solution to popup a window regardless of that popblocker as Hotmail and yahoo shows popupwindow on deleteing of emails thanx in advance**

    R A M

    **

    ASP.NET

  • paging in datalist in vb.net1.1
    M MalikRizwan

    use paged data source like this Dim dsPaged As New PagedDataSource dsPaged.DataSource = ds.Tables(0).DefaultView dsPaged.AllowPaging = True dsPaged.PageSize = 5 it is more flexible**

    R A M

    **

    ASP.NET csharp help

  • Creating VB Forms on FLY
    M MalikRizwan

    I have got the solution ... Forms Collection is used for Loaded forms in memory so Forms.Add(rs("FormName")) for each frm in forms if frm.name="Form2" then frm.show end if**

    R A M

    **

    Visual Basic database question
  • Login

  • Don't have an account? Register

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