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

tiwal

@tiwal
About
Posts
75
Topics
22
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using a GAC-registered assembly in a web application
    T tiwal

    Eddy Vluggen wrote:

    Why? Any specific reason why it is considered "bad"?

    Well I assume they, like me, were expecting everything to work fine without the need to add the specified tags to the web.config ... appearently, we both were wrong....

    .NET (Core and Framework) question dotnet security help

  • Using a GAC-registered assembly in a web application
    T tiwal

    Hi Eddy thanks for answering. You mean that I still need the tag in the application's web.config ? Doesn't the application's assembly contain a reference itself ? The production cluster specialists in my company scolded me for putting the tag in the web. config, but then I showed them how it would behave without it, and they were baffled ....

    .NET (Core and Framework) question dotnet security help

  • Using a GAC-registered assembly in a web application
    T tiwal

    Hello , I am currently working on a project which requires the use of a custom dll for authentication. This dll is registered (so they told me) in the GAC of both the Production and Test environments. The company policies state that you "shouldn't include the dll reference in your application's web.config file", that is, you shouldn't have something like : etc. in your web.config, at least for this dll I am talking about. They say, since it's registered in the GAC, the application will load it anyway. The problem is , if you don't add the assemby reference in your web .config , the application is not going to find it , no matter what they say. Since I am sure the dll is actually registered in the GAC, my question is : shouldn't the application be able to load the dll anyway , no matter if you add the reference in the web.config or not ? I was convinced that, adding the reference to the project, the dll 's GAC location would be stored in the application's assembly so that the application itself would be able to find the assembly in the GAC , no matter what the working system is , given that the dll is actually registered in the working system's GAC . But I must be wrong. What is the real way it works ? Thanks Leo

    .NET (Core and Framework) question dotnet security help

  • Detailsview InsertItem
    T tiwal

    To make things clearer here is my marlup :

    <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Insert.aspx.cs" Inherits="DBManagerWebForm.Insert" %>

    <%--
    \--%>
    

    and this is the codebehind :

    protected void DetailsView1_ItemInserting(object sender, DetailsViewInsertEventArgs e)
    {
    int i;
    SqlDbType T;
    try
    {
    string Cmd = "INSERT INTO " + TABLE + " (";
    IEnumerator En = e.Values.Keys.GetEnumerator();
    En.Reset();
    for (i = 0; i < e.Values.Count - 1; i++)
    {
    En.MoveNext();
    Cmd += En.Current.ToString() + ",";
    }
    En.MoveNext();
    Cmd += En.Current.ToString() + ") VALUES (";
    string val;

                En.Reset();
                for (i = 0; i < e.Values.Count - 1; i++) 
                {
                    En.MoveNext();
                    T = Util.GetSqlType(DT.Columns\[i\].DataType);
                    val = e.Values\[En.Current\] == null ? "" : e.Values\[En.Current\].ToString();
                    if (T == SqlDbType.NVarChar)
                        Cmd += "'" + val + "',";
                    else
                        Cmd += val + ",";
                }
                En.MoveNext();
                T = Util.GetSqlType(DT.Columns\[i\].DataType);
                val = e.Values\[En.Current\] == null ? "" : e.Values\[En.Current\].ToString();
                if (T == SqlDbType.NVarChar)
                    Cmd += "'" + val + "')";
                else
                    Cmd += val + ")";
    

    string ConnStr = WebConfigurationManager.Connect

    ASP.NET database wpf wcf xml help

  • Detailsview InsertItem
    T tiwal

    Hello I am trying to use a DetailsView to insert a neew item into a db table. The problem is, I organized all not knowing the table's schema a priori. I use a Gridview to visualize and update the table , and it all works correctly by binding dynamically the gridview to the table in the PageLoad event handler. I don't use any template. When I try to do something similar to insert a new row using a dynamically bound detailsview , I correctly visualize the fields' names in the detailsview, but as I modify the values, and try to manage the insert event , I find into the DetailsViewInsertEventArgs parameter that the Values collection property only has the Keys subcollection correctly populated, but the Values are all empty . I would expect, but maybe I didn't understand well, the Values.Values subcollection to be populated with the values I inserted, just as find the Values.Keys subcollection populated with the fiedls' names. Is it due to the fact that I am bindingg dynamically ? is there a way to work around this limitation ?

    ASP.NET database wpf wcf xml help

  • SelectSingleNode issue
    T tiwal

    Richard you didn't try exactly what I did : you loaded the xml as a string . I did the same thing and it works fine. Try doing as I do, that is loading a real xml file : I bet it won't work either....

    C# xml help question

  • SelectSingleNode issue
    T tiwal

    Here it is :

    String LanguageFileName = "\\Language" + Session["Language"].ToString() + ".xml";

    fPath = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase).LocalPath);

    fPath += LanguageFileName;
    XmlDocument LanguageDoc = new XmlDocument();

    The "Language" session variable is passed by another page that redirects to this one: for now it is "English" , so in the end you get LanguageFileName = "LanguageEnglish.xml" and the fPath is where the file actually is .

    C# xml help question

  • SelectSingleNode issue
    T tiwal

    You mean things like the following : ? in the starting version it was present, but when I removed it to make a test, I noticed no change at all, so I left it out....

    C# xml help question

  • SelectSingleNode issue
    T tiwal

    problems on the xml ?I wonder which kind of problems could they be ... it is such a simple xml....

    C# xml help question

  • SelectSingleNode issue
    T tiwal

    so the only reasonable answer is that I have problems in the installation of my framework 4.5 ...

    C# xml help question

  • SelectSingleNode issue
    T tiwal

    Yes sir I'm sure. Not to make mistakes, I copy/pasted the element names from the xml to the code.I checked countless times, and tried thousands of possible variations of the code, without any effect.

    C# xml help question

  • SelectSingleNode issue
    T tiwal

    I have a very basic xml document :

    About
    Registration
    Enter
    

    This site is about friends and games

    I just want to grab the innerText of the , and nodes and assign them to three different Hyperlinks in a web page . So here is what I do (assuming fPath contains the path to this xml ile) :

    LanguageDoc.Load(fPath);
    XmlNode root = LanguageDoc.DocumentElement;
    main = root.SelectSingleNode("/language/main");
    HyperLinkAbout.Text = main.SelectSingleNode("aboutlink").InnerText;
    HyperLinkRegistration.Text = main.SelectSingleNode("registrationlink").InnerText;
    HyperLinkLogin.Text = main.SelectSingleNode("loginlink").InnerText;

    What's happening is that after the first call to main.SelectSingleNode ("aboutlink").InnerText (which is successful and gives me the right value to assign to the first hyperlink), the second call returns a null object, so the call to the InnetText method fails and I get an exception. The element searched for exists in the xml, and I think the XPath path to that element is correct. So, what's happening ?

    C# xml help question

  • the usual annoying absurdity
    T tiwal

    I have a very very simple asp.net application with a very very simple page on it, the defaul.aspx. In the page's code behind I have the usual Page_Load handler where I simply ask myself if it is a postback or not ( if (!IsPostBack) {...}). How is it possible that, without having any controls on the page, I run into the !IsPostBack three times as I simply call the page ? It is like the page is called three times .... Is there any explaination to this ridiculous behaviour ? MSDN doesn' t absolutely talk about details of Load event , it just says it is called at a certain point of the "page life cicle" .-...

    ASP.NET csharp asp-net question

  • strange Sql Server error
    T tiwal

    You are right my friend .... executing the query you suggested I realized I am actually using Sql Server 2008 .... and this maybe will solve some other problems I think I have ... Thank you very much

    Database database learning sql-server sysadmin testing

  • strange Sql Server error
    T tiwal

    Well, that's what it says on "Help | About" section from the top menu .... Other infos are : Microsoft SQL Server Management Studio 11.0.2100.60 Microsoft Data Access Components (MDAC) 6.1.7601.17514 Microsoft MSXML 3.0 4.0 5.0 6.0 Microsoft Internet Explorer 9.11.9600.17801 Microsoft .NET Framework 4.0.30319.34209 Operating System 6.1.7601 Is it possible I have some components that's missing ?

    Database database learning sql-server sysadmin testing

  • strange Sql Server error
    T tiwal

    A sudden thought ... is it possibile that I am getting this error only because I am using the Express version of Sql Server 2012 ? Maybe the express version, being not complete, lacks the "LAG" function.... Just a random thought .....

    Database database learning sql-server sysadmin testing

  • strange Sql Server error
    T tiwal

    Hello . I am quite a beginner in Sql Server, I am testing some simple sql code on Sql Server 2012. I have a table called "AcctTransaction" composed by 4 columns :

    AccountId as Int,
    TransactionId as Int,
    TransactionDate as DateTime,
    Amount as Decimal (a8,4)

    I am trying to make this simple query work :

    SELECT AccountId
    ,SUM(Amount) OVER (PARTITION BY AccountId) AS FinalBalance
    ,SUM(Amount) OVER (PARTITION BY AccountId ORDER BY TransactionDate, TransactionId
    ) AS ProgressiveBalance
    FROM AcctTransaction

    I keep getting the following error :

    Incorrect syntax near "order" and in effect if I comment out the

    ,SUM(Amount) OVER (PARTITION BY AccountId ORDER BY TransactionDate, TransactionId ) AS ProgressiveBalance

    statement, everything works correctly. What's wrong with that statement ? I've made this query copying almost identically a sql statement I saw in a Microsoft course, where it seems to work perfectly.... Thanks to everyone who would answer ...

    Database database learning sql-server sysadmin testing

  • about classic asp
    T tiwal

    I followed instructions about installing it on IIS 7.0 on Windows 7, which is the configuration I have , but I am not sure it is all I need ..... your link is about installing it on Windows 2012 server , I think it is not the same, right ?

    Web Development tutorial html com windows-admin question

  • about classic asp
    T tiwal

    I have been playing around with some very basic code in classic asp . I have the following simple page that I tried to reach on my own pc :

    <html>

    <body>

    <%
    d=weekday(Date)

    Select Case d
    Case 1
    response.write("Sleepy Sunday")
    Case 2
    response.write("Monday again!")
    Case 3
    response.write("Just Tuesday!")
    Case 4
    response.write("Wednesday!")
    Case 5
    response.write("Thursday...")
    Case 6
    response.write("Finally Friday!")
    Case Else
    response.write("Super Saturday!!!!")
    End Select
    %>

    This example demonstrates the "Select Case" statement.

    You will receive a different greeting based on what day it is.

    Note that Sunday=1, Monday=2, Tuesday=3, etc.

    </body>
    </html>

    (copy-pasted from the site http://www.w3schools.com/[^]) I just can see the asp code , not the effect of it on the browser. Given that the code is probably reliable, coming from such a site, and it should work, I can only suppose my IIS7 settings are not the right ones to allow classic asp code to run . I have very poor experience on classic asp and its configuration on IIS . Can anyone give me hints about how to make the whole thing work ?

    Web Development tutorial html com windows-admin question

  • A simple question about Static Controls
    T tiwal

    Thank you both Superman and Richard ... now the Static appears correctly ...:thumbsup:

    C / C++ / MFC help question c++ json
  • Login

  • Don't have an account? Register

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