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
T

Tash18

@Tash18
About
Posts
133
Topics
35
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Database Error
    T Tash18

    Hi, I have developed an ASP.net VB application on 1.1 in which we insert certain data into a particular table which is on sybase. My table structure: CREATE TABLE dbo.at_ip_disbursement ( doc_id numeric(7,0) IDENTITY, doc_type varchar(30) NOT NULL, rim_no int NOT NULL, item_type varchar(80) NULL, customer_name varchar(80) NOT NULL, rsm_name varchar(80) NOT NULL, branch_no int NULL, business_unit varchar(30) NOT NULL, input_dt datetime NOT NULL, Category varchar(30) NULL, deferral_details nvarchar(600) NULL, days_deferred int NULL, Deff_Expdt datetime NOT NULL, Deferred_Dt datetime NULL, rm_comments nvarchar(600) NULL, creator_id varchar(10) NULL, modifier_id varchar(10) NULL, status char(1) NOT NULL, App_Authority nvarchar(600) NULL ) LOCK ALLPAGES go IF OBJECT_ID('dbo.at_ip_disbursement') IS NOT NULL PRINT '<<< CREATED TABLE dbo.at_ip_disbursement >>>' ELSE PRINT '<<< FAILED CREATING TABLE dbo.at_ip_disbursement >>>' go Now the piece of code where the insert takes place:

    Public Shared Function AddDisbursement(ByVal DocType As String, ByVal Rim As Int32, ByVal CustomerName As String, ByVal RSMName As String, ByVal BranchNo As Int32, ByVal Business As String, ByVal InputDate As String, ByVal Category As String, ByVal DeferralDetails As String, ByVal DeferredDays As String, ByVal DefExpDate As String, ByVal DefDate As String, ByVal RMComments As String, ByVal CreatorId As String, ByVal App_Authority As String, ByVal Item As String) As String
    Dim logger As SKLogger = New SKLogger
    Dim connMosaic As String = System.Web.HttpContext.Current.Session("connStr").ToString()
    Dim cmdText As String

        cmdText = "INSERT INTO at\_ip\_disbursement(" & \_
                    "doc\_type, " & \_
                    "rim\_no, " & \_
                    "customer\_name, " & \_
                    "rsm\_name, " & \_
                    "branch\_no, " & \_
                    "business\_unit, " & \_
                    "input\_dt, " & \_
                    "Category, " & \_
                    "deferral\_details, " & \_
                    "days\_deferred, " & \_
                    "Deff\_Expdt, " & \_
                    "Deferred\_Dt, " & \_
                    "rm\_comments, " & \_
    
    ASP.NET csharp asp-net database business sales

  • Email Not be recognised as a link
    T Tash18

    Hi guys, I have developed a web application which has an option to send email, its all working fine except for the content where i face an issue. if in an email I send some raw HTML like Hi, you email is: test@email.com The Email client recognizes it as an email and is displayed as a link. test@email.com but i dont want it to display as a link whereas it has to be displayed as a plain text Kindly advise. Thanks inadvance Regards, Tash

    ASP.NET html com help

  • Write contents of dataset into email
    T Tash18

    is it possible to display as the table as such with the column names and all..??

    C# csharp database help question

  • Write contents of dataset into email
    T Tash18

    Thanx a lot dude... now have to work on it.. Thanx alot..

    C# csharp database help question

  • Write contents of dataset into email
    T Tash18

    Thanx for the reply, Have you got any sample codes to share??? regards, Tash

    C# csharp database help question

  • Write contents of dataset into email
    T Tash18

    Hi guys.. I have a console application developed on c# VS2003 which sends email based on the query check now when the query returns multiple rows i store them in a dataset can anyone kindly tell me how do i extract the contents from the dataset and paste it on the content of my email. Any help is highly appreciated.. Thanx inadvance, Tash

    C# csharp database help question

  • AutoPostBack Event Doesnt get Fired
    T Tash18

    Hi.. Thanx for the reply.. well thats what i have done.. finally completed it with javascript.. but still im amazed why doesnt the logic takeplace at the text changed method of the textbox.:confused:. will investigate on it, finally have done the task. Thanx and regards, Tash..

    ASP.NET csharp javascript asp-net sysadmin help

  • AutoPostBack Event Doesnt get Fired
    T Tash18

    Hi guys, Im working on a Asp.net web page(VS2003 V1.1) here i have a page in which there is a textbox1 which is readonly and it gets filled up with the system date and i have another textbox2 with a calendar in it so that the user clicks the calendar and chooses the date and the textbox2 gets filled with the chosen date, Now here comes the issue i have another textbox called textbox3 which actually gets populated with the difference between the dates chosen. so i have written my difference in date calculation on the method textbox2_TextChanged and i have set the AutoPostBack function as TRUE. But after the user selects the date on textbox2 and navigates to textbox3 the autopostback event doesnt get fired but instead after all these 3 textboxes i have a radio button which when checked i have written a code whose autopostback is set true. Now when the checkbox is checked the autopostback event of textbox2 gets fired after which the autopostback event of the checkbox gets fired. On Whole the AutoPostBack event of Textbox2 gets fired only when the AutoPostBack of any other control gets fired. My friends are advising me to code the difference of the dates in JavaScript instead of coding it on the TextChanged method of the textbox. But as you see im very Weak in Javascript. Below is my code: Page.aspx

    <tr>
    <TD style="WIDTH: 211px; HEIGHT: 3px" width="211" height="3">Date</TD>
    <TD width="70%" height="28"><asp:textbox id="txtDate" runat="server" CssClass="txtboxNormal" Width="96px" MaxLength="10"
    ReadOnly="True"></asp:textbox></TD>
    </tr>
    <TR>
    <TD style="WIDTH: 211px; HEIGHT: 34px" width="211" height="34">Date of Compliance</TD>
    <TD style="HEIGHT: 34px" width="70%" height="34"><asp:textbox id="txtCompDate" runat="server" CssClass="txtboxNormal" Width="96px" MaxLength="10"
    AutoPostBack="True"></asp:textbox>  <IMG onclick="javascript:OpenCalendar('Date');" src="../DatePicker/calendar15.jpg" border="0"
    id="IMG1" runat="server"></TD>
    </TR>

    Javascript for the calendar on the aspx page:

    function OpenCalendar(field)
    {
    var MyArgs = window.showModalDialog("../DatePicker/aspdatepicker.asp", "null","dialogHeight:210px;dialogWidth:180px;status:no;resizable:no;center:yes");
    var myDate = new Date();
    if(field == "Date")
    {
    document.forms[0].txtCompliedDt.value = MyArgs;
    }
    }

    ASP.NET csharp javascript asp-net sysadmin help

  • web.config
    T Tash18

    YES : Because all the configuration settings will be available under MACHINE.CONFIG file, by default these settings will be applied to all asp.net applications. The MACHINE.CONFIG file will be automitacally loaded when .net framework is installed. Thanx and regards, Tash

    ASP.NET csharp asp-net question

  • Javascript confirm box with c#
    T Tash18

    Hi guyss.. Actually in my web page a person-X can assign a task to another person-Y and on the dash board of Y that task will be displayed on opening the task it will show him the details of the task. the task can be completed by a series if activity. Now i have a button called add activity on clicking the button it redirects to the activity page. Now here i need some help actually the activity page has a status dropdownlist which has two options which is open and closed.. a person can create an activity with status open and later when the activity is over he can edit the activity and change the status to close.. Now when a person changes the activity status to close i need a confirmation box to popup asking the user whether the TASK IS COMPLETED (Not the activity) if the user clicks ok then the task is closed otherwise wen he clicks cancel button it should just update the activity status. Now i have made the confirmation box to popup but the problem is i am using javascript for the confirmation box when user clicks ok it closes the task but wen i click cancel i cant make it to just update the activity status.. Im confused wher do i write the code when the user clicks cancel button.. please guide me.. My code is as follows: When the status is changed to close:

    private void ddlStatus_SelectedIndexChanged(object sender, System.EventArgs e)
    {
    if(ddlStatus.SelectedValue.ToString() == "Closed")
    {
    btnAdd.Attributes.Add("onClick","javascript:return(confirm('Are you sure you want to close the Activity?'));");
    }
    }

    When user clicks ok the button click event gets fired:

    private void btnAdd_Click(object sender, System.EventArgs e)
    {
    if(ds.Tables.Count > 0)
    {
    if(ds.Tables[0].Rows.Count > 0)
    {
    int id = Convert.ToInt32(ds.Tables[0].Rows[0].ItemArray[0]);
    UpdateTextField(id,1,txtDesc.Text.Trim().Replace("'","''"));
    UpdateTextField(id,2,txtIssues.Text.Trim().Replace("'","''"));
    UpdateTextField(id,3,txtBusTechAdv.Text.Trim().Replace("'","''"));
    }
    }
    }

    but where do i place my code when the user clicks cancel button bcoz on clicking cancel idont think any event gets fired.. Please advise me.. Thanx in advance, Tash.

    ASP.NET help csharp javascript tutorial question

  • Hyper Link in datagrid to download a file
    T Tash18

    Hi thanks for your reply. Actually i can display the path of the file in my page. since im using a repeater over here i wanna show the path of the file as a hyper link and when user clicks on the path the file should get downloaded.. im struggling at this point.. Any help is appreciated.. Thanx in advance, Tash

    ASP.NET csharp database asp-net tutorial

  • Hyper Link in datagrid to download a file
    T Tash18

    Hi guys, Im working on asp.net1.1 web application on C#. actually i have a page in which the user fills up certain details and also have an option to upload a file which is mandatory. Now at the database along with the details entered by the user the file location path also gets saved in the database say for example D:\webapp\Hello\Modules\Agreement\01-11-2010 08-43-50AMimage.gif -- dis is what gets stored in the DB. Now after the user has clicked the submit button the data is inserted and i also have a datagrid in the same page on which the data stored in database gets populated, currently the path of the file is displayed on the datagrid as mentioned above. but what my requirement is i want the path to be displayed as a hyperlink so dat on clicking the link the file gets downloaded.. trhe code is as follows the following code is on page display.aspx.cs

    	private void BindAgreement()
    	{
    		string Module = Request.QueryString\["servId"\];
    		DataSet dReasons  = DataAccess.ExecuteStoredProcedure(Session\["MosaicConn"\].ToString(),"asp\_app\_get\_mainagreement "+Module);
    		if(dReasons.Tables.Count > 0)
    		{
    			if(dReasons.Tables\[0\].Rows.Count > 0)
    			{
    				DataTable dtDisplay = new DataTable();
    				dtDisplay.Columns.Add(new DataColumn("row\_id",typeof(string)));
    				dtDisplay.Columns.Add(new DataColumn("module\_id",typeof(string)));
    				dtDisplay.Columns.Add(new DataColumn("total\_value",typeof(string)));
    				dtDisplay.Columns.Add(new DataColumn("amc\_start\_dt",typeof(string)));
    				dtDisplay.Columns.Add(new DataColumn("license\_amt",typeof(string)));
    				dtDisplay.Columns.Add(new DataColumn("implement\_amt",typeof(string)));
    				dtDisplay.Columns.Add(new DataColumn("number\_of\_licenses",typeof(string)));
    				dtDisplay.Columns.Add(new DataColumn("agree\_file\_name",typeof(string)));
    
    				for(int i = 0; i < dReasons.Tables\[0\].Rows.Count; i++)
    				{
    					DataRow drDisplay;
    					drDisplay = dtDisplay.NewRow();
    					drDisplay\[0\] = dReasons.Tables\[0\].Rows\[i\].ItemArray\[0\];
    					drDisplay\[1\] = dReasons.Tables\[0\].Rows\[i\].ItemArray\[1\];
    					drDisplay\[2\] = dReasons.Tables\[0\].Rows\[i\].ItemArray\[2\];
    					drDisplay\[3\] = dReasons.Tables\[0\].Rows\[i\].ItemArray\[3\];
    					drDisplay\[4\] = dReasons.Tables\[0\].Rows\[i\].ItemArray\[4\];
    					drDisplay\[5\] = dReasons.Tables\[0\].Rows\[i\].ItemArray\[5\];
    					drDisplay\[6\] = dReasons.Tables\[0\].Rows\[i\].ItemArray\[6\];
    					drDisplay\[7\] = dReasons.Tables\[0\].Rows\[i\].ItemArray\[7\];
    					dtDisplay.Rows.Add(drDisplay);
    				}
    				lblMes
    
    ASP.NET csharp database asp-net tutorial

  • New column retrival on Sql
    T Tash18

    Thanx a million buddy.. works like a charm.... thanx alot...

    Database database agentic-ai help tutorial

  • New column retrival on Sql
    T Tash18

    Hi guys... Actually i have a table called products which has 4 products in it say for example pepsi, miranda, coke and fanta. The table has two columns product id and productname as follows: 1 pepsi 2 miranda 3 coke 4 fanta now i have another table called agent, which has 3 columns such as agentid, region, productid. Now each agentid has a region and productid assigned to it as follows: 1001 DXB 1 1001 AJM 4 1002 ABC 2 1003 XYZ 3 1003 DEF 4 and so on. now in my application i need to make use of a query which gives me a result of all the product name with status for any particular agent id, for example: for agentid 1001 the result should be

    productname status

    pepsi true
    miranda false
    coke false
    fanta true

    the query i tried is :

    select a.productname, status = case b.product_id
    when 1 then 'True' else 'False'
    when 2 then 'True' else 'False'
    when 3 then 'True' else 'False'
    when 4 then 'True' else 'False' end
    from products a, agent b where a.productid = b.productid and agentid ='1001'

    but doest work... any help is appreciated...

    Database database agentic-ai help tutorial

  • getting value zero when caculating value between dates in ado.net using asp.net with c#
    T Tash18

    Hi.. Do one thing debug the code, add a 'quick watch' on the query and copy the query from the 'quick watch' window and paste in on sql analyzer and run the query and let me know. Thanks and Regards, Tash

    ASP.NET csharp asp-net database

  • getting value zero when caculating value between dates in ado.net using asp.net with c#
    T Tash18

    Hi... I hope the problem is with the date which the query gets from the text field. can u debug and tell me in what format the date is returned from the text field.. Thanks and regards, Tash

    ASP.NET csharp asp-net database

  • Problem with Dropdownlist (DDL) box...
    T Tash18

    I think im not framing my if condition in a proper manner... plz advise.. Thanx in advance, Tash

    ASP.NET csharp help database

  • Problem with Dropdownlist (DDL) box...
    T Tash18

    thanx for ur reply.. my DDL gets loaded with the items on pageload. so the DDL has items in it.. the If condition that im using is working fine if the item retrieved from the database is present in my DDL, it throws an exception only if that item is not present in my DDL...

    if(ddl_Benef.Items.FindByValue(myDr["BenefName"].ToString().Trim()).Value == myDr["BenefName"].ToString())
    {
    ddl_Benef.Items.FindByValue(myDr["BenefName"].ToString().Trim()).Selected=true;
    }
    else
    {
    ddl_Benef.Items.FindByText("Select an option").Selected=true;
    }

    Im not sure if my condition in the if statement is properly framed or not... plz advise.. Thanx in advance, Tash..

    ASP.NET csharp help database

  • Problem with Dropdownlist (DDL) box...
    T Tash18

    Hi thanks for ur reply.. actually in my DDL i have set the 1st item as "Select an option" and the remaining items gets populated from the database... now thats not the issue... when i try 2 edit an Existing form, the page loads with the datas from the database at that time it picks up an item from the database and tries to locate that item in my DDL.. what i exactly want is it should not throw an exception if that item is not present in my DDL but instead should display my 1st item which is -- "Select an option"... Hope u understand rite now.. Thanx in advance.. Tash

    ASP.NET csharp help database

  • Problem with Dropdownlist (DDL) box...
    T Tash18

    Hi guys.. Im working on a web application on C#.net with VS2003(Framework1.1).. in my page i have a DDL which populates the items from the database... now on my page the user fills a form by selecting the items from the DDL. The user can also edit previous froms, at this stage the datas come from the database and gets filled on the textbox,DDL, radio buttons etc to edit the fields. Now when a data from the database is not present in the DDL list i get an exception to handle this situation i need to set a condition such that it checks if the data from the database is present in the DDL list then it shows in the DDL otherwise it must show the Fist item in the DDL which is "Select an option". so i put up the following condition:

    if(ddl_Benef.Items.FindByValue(myDr["BenefName"].ToString().Trim()).Value == myDr["BenefName"].ToString())
    {
    ddl_Benef.Items.FindByValue(myDr["BenefName"].ToString().Trim()).Selected=true;
    }
    else
    {
    ddl_Benef.Items.FindByText("Select an option").Selected=true;
    }

    here if the data from the database is present in the DDL the code works fine in case the data is not present in the DDL then it doesnt go to the else condition instead gives me "System.NullReferenceException: Object reference not set to an instance of an object." Any help or advice is appreciated... Thanx in advance, Tash

    ASP.NET csharp help database
  • Login

  • Don't have an account? Register

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