Category Archives: .Net Tutorial

Steps to Call Stored Procedure with Parameters from C# .Net

Many Confusions while calling procedure from your asp.net. Generally it’s because less practice of using oracle with .Net code. Following is the example. Hope it’ll be useful to you. Procedure : create or replace procedure ProcTest(param1 in varchar, param2 in … Continue reading

Access master page control from content page C# asp.net

If you are using content page and want to hide some menu or row of master page as per access you can do it following way. Master Page <%– Some Code –%> <table width=”90%” border=”0″ cellspacing=”0″ cellpadding=”0″> <tr runat=”server” id=”trMenu”> … Continue reading

Get Local Computer IP Address using GetHostEntry in C#

If you are running .Net framework 4 and want to get IP address of local machine using C# code then just make following function which will return you local machine ip address. using System.Net; private string GetLocalIP() { IPAddress[] IPAddList … Continue reading

Resolved : A generic error occurred in GDI+ error in C#

Working with Copy image or Resize image. You may get error that “A generic error occurred in GDI+”. I have come across to following two codes. Code 1 : public void Resize(string oldFilePath, string newFilePath, OrgFile, NewFile) { try { … Continue reading

Get File Name using Javascript : ASP.NET FileUpload Control

Many of C# developers looking for getting filename at client side. Following is the solution for that. <%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”upload.aspx.cs” Inherits=”UploadImagePreview.upload” %> <!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> <script type=”text/javascript”> function … Continue reading