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
K

Kapil Thakur

@Kapil Thakur
About
Posts
67
Topics
21
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • getting value of dynamic textbox after post back
    K Kapil Thakur

    Create a HashTable and add the control id as key and control value as value. Then at postback get the control's value using Request.Form(control_id) and create the control again and assign it the same value. Example :       Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load             Try                   If Not IsNothing(ViewState("ht")) Then                         Dim v_ht As New Hashtable                         v_ht = CType(ViewState("ht"), Hashtable)                         For i As Integer = 0 To v_ht.Count - 1                               'getting value of 1st control                               Dim a = Request.Form("txt_1")                               'getting value of 2nd control                               Dim b = Request.Form("txt_2")                         Next                   Else                         Dim ht As New Hashtable                         'dynamically created 1st control                         Dim txt As TextBox                         txt = New TextBox                         txt.ID = "txt_1"                         txt.Text = "CODE"  &n

    ASP.NET design help

  • how to bold a particular item of a dataset programatically
    K Kapil Thakur

    Dataset does not supports adding styles or formatting for text. However you can add style or text formatting to its binding control like gridview etc.

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET tutorial

  • related to website
    K Kapil Thakur

    use SQL cache dependency with page output cache. whenever there will be change in database table data your page data will be automatically reacreated, thus solving your problem. Google for it, you'll find many articles

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET csharp question php asp-net database

  • Replacing the Old File With Newly Uploaded File
    K Kapil Thakur

    use a hyperlink instead of linkbutton and give the path of the file in its NavigateURL attribute.

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET database css

  • searching for v.good web hosting service
    K Kapil Thakur

    Im afraid i dont know much about VPS hosting. but going through their site....i found it very expensive You can have a look at this link http://www.computinghost.com/windows\_web\_hosting\_files/windows-hosting-information.html Alternatively you can drop a mail to the support team of ComputingHost.com specifying your business needs and ask them whats the best plan for you? Then you can decide further on your own. Also do cross check from other sites as well as there are huge differences in pricing across internet. It is really a confusing thing and you need to double check everything before going for any option anywhere.

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    Web Development database business csharp php mysql

  • searching for v.good web hosting service
    K Kapil Thakur

    Have a look at www.ComputingHost.com they have good plans and after sales support.

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    Web Development database business csharp php mysql

  • showing image im gridview from ms access
    K Kapil Thakur

    save the relative path of the image in the database. Put an image control in item template of gridview. bind the image control with the relative path of the images and the image will show.

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET database tutorial question

  • Setting value for datarow if its null [modified]
    K Kapil Thakur

    google for ((what) ? then : else) C#

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET sharepoint database help

  • Setting value for datarow if its null [modified]
    K Kapil Thakur

    IIF is in vb.net for C# its ((what) ? then : else) Apologies for the goof up

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET sharepoint database help

  • Asp.net page getting expired - "internet explorer cannot dispaly a message"
    K Kapil Thakur

    the way you are doing currently is almost impossible and senseless to keep page alive for so long. However you can make an asynchronous call to a function which will do all the required processing and after successful completion will sent back confirmation through ws_callback method. then you can show the "successfully done" message to confirm that processing has been done. You can google for asynchronous calls

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET csharp asp-net database sysadmin tutorial

  • Export data from datatable to Excel
    K Kapil Thakur

    give a linkbutton "export to excel" and do the following code on its click event Dim Grid As New System.Web.UI.WebControls.GridView Try       Grid.AutoGenerateColumns = True       Grid.RowStyle.Wrap = True       Grid.AlternatingRowStyle.Wrap = True       Grid.DataSource = [YOUR DATASET]       Grid.DataBind()       -- header style required by you for excel       Grid.HeaderRow.Cells(0).Width = 200       Grid.HeaderRow.Style("font-family") = "Verdana"       Grid.HeaderRow.Style("font-size") = "12px"       Grid.HeaderRow.Font.Bold = True       Grid.HeaderRow.ForeColor = Color.White       Grid.HeaderRow.BackColor = Color.Blue       For Each row As System.Web.UI.WebControls.GridViewRow In Grid.Rows             -- row style required by you for excel             row.Cells(0).Width = 100             row.Style("font-family") = "Verdana"             row.Style("font-size") = "12px"             row.Style("text-align") = "left"       Next       Response.Clear()       Response.AddHeader("content-disposition", "attachment;filename=" & [YOUR PREFERRED FILE NAME] & ".xls")       Response.Charset = ""       Response.Cache.SetCacheability(HttpCacheability.NoCache)       Response.ContentType = "application/vnd.xls"       Dim stringWrite As New System.IO.StringWriter()       Dim htmlWrite As New HtmlTextWriter(stringWrite)       Grid.RenderControl(htmlWrite)       Response.Write(stringWrite.ToString())       Response.End() Catch ex As Exception Finally       Grid.Dispose()       Grid = Nothing End Try

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET tools tutorial

  • Setting value for datarow if its null [modified]
    K Kapil Thakur

    try using the following code : foreach (DataRow dtRow in dtTrackingData.Rows) { SqlHelper.ExecuteNonQuery ( myConnectionString , "SP_NAME" , iWeekNo , Convert.ToInt32(dtRow["InvCoID"]) , IIF(IsDBNull(dtRow["LatestReportDateConsensus"]), "null" , dtRow["LatestReportDateConsensus"] ) , Convert.ToDateTime(dtRow["LatestReportDateVirtua"]) ,dtFromDate ,dtToDate ,CreatedBy ); } i have used IIF function; it checks if datevalue is true for dbnull then adds null in database else the datevalue of datatable column

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET sharepoint database help

  • Display progress status information
    K Kapil Thakur

    Use AJAX, place an update panel and keep changing text of a label based on the functionality you are doing. Example, when executing code for creating file1....put label text as creating file1. then afterwards when saving in database....put label text as saving data etc.

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET csharp asp-net tutorial

  • Windows Service doubt
    K Kapil Thakur

    install the service in your system. start the service. Click the "Tools" tab in Microsoft Visual Studio project. Click "Attach To Process" option. it will be show a list of services running in your system. Locate your service name and double click it. It will attach debugger to your service. Now when your service will run you will be able to debug it in your VS.Net project.

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET sysadmin debugging help

  • Changing text of embedded image in email
    K Kapil Thakur

    Hi, I am sending an embedded image in an email. now i want to change some text in the image for every user. how can i do that ? Is there any way that i can fetch the text of an image and change it and then embed the new image in the email.

    Thanks and Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET question com hardware

  • creating image of a web page
    K Kapil Thakur

    how can i create an image of a web page by either web or windows application. example, www.yahoo.com is the url. i want to create an image of this url. Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET com tutorial question

  • pop up window on datagrid
    K Kapil Thakur

    just add target = "_blank" to the hyperlink html property Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET question

  • Preventing multiple call to button's event handler
    K Kapil Thakur

    hi, i have added a button in windows datagrid. it works fine when i load the grid first time and click the button. but if i reload the datagrid again on some event and i click the button, its click handler is called twice. if i again load the grid then the click handler is called thrice. how can i correct this ? i want to call the button's click handler only once like in normal application.

    Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    Visual Basic question css com

  • View Source
    K Kapil Thakur

    hi, YOU CANNOT DO THAT. you can stop the right click on browser....but you cannot disable ViewSource menuitem in View menu in toolbar.......it just cannot be achieved by any means.... i once had the same problem. you can decrypt the code but make sure to take a back up of html. Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com

    ASP.NET help question

  • IE pagesetup property for printersetup through javascript?
    K Kapil Thakur

    hi, use the follwing code in section and change the text in BOLD to your values javascript:window.open('http://www.YOUR URL.com','YOUR PAGE TITLE','width=570,height=650,top='+((screen.height/2)-(NaN))+',left='+((screen.width/2)-(NaN))+',toolbar=no,scrollbars=no,resizable=no,menubar=no,status=no,directories=no,location=no'); Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com </x-turndown>

    ASP.NET javascript tutorial question workspace
  • Login

  • Don't have an account? Register

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