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
A

Anand Desai

@Anand Desai
About
Posts
92
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • print customised footer on every page on client machine while printing
    A Anand Desai

    Christian Graus wrote:

    to know where the page breaks are, and insert the footer accordingly

    Ouch!!! That will cause lot of coplexity. Specially if content have images, I have to mind image height and everything. Actually I thought of that before but for the same probelm as I mentioned, I refuse that solution. I have also thought of one other solution that is to create word/pdf document (on click event of that button) on client machine and put footer on that. but that will look very ugly.(imagine clicking Print button, one document is being downloded on client machine). Can I access client machine Registry by Javascript? I think thento It will cause permission problem to modify remote machine registry. Am I right? Thanks for suggession Christian!!

    Anand Desai Developer Atharva Infotech

    ASP.NET help sysadmin windows-admin question

  • print customised footer on every page on client machine while printing
    A Anand Desai

    Hi coders, Currently I am going through a bit complicated problem. It would be great if I get help from you. The issues is, I have "print this page" button on each page on my site. Where I have called "window.print()". Now my client wants customised footer on that including his logo etc. So now, on that print button, I popup a window and pass the content to another predifed page with footer. Its working nice if only 1 page print is their, but if content is big and expands to 2 or more pages then my footer is printed on last page only (Obviously). So, I wrote a code for manipulating the Registry Key for "Microsoft\\Internet Explorer\\PageSetup". Code is below:

          string strPath = "Software\\\\Microsoft\\\\Internet Explorer\\\\PageSetup";
          Microsoft.Win32.RegistryKey oKey = null;
    
          /\* The following lines of code takes care that error does not occur if registry settings are not at proper path.\*/
          oKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey (strPath, true);
          if (oKey != null)
          {
              oKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(strPath, true);
          }
          else
          {
            oKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey (strPath, true);
          }
            
          string strKey = "footer";
          //object oValue = "&u&b&d"; 
          object oValue = "test footer"; 
          oKey.SetValue (strKey, oValue);
          strKey = "header";
          oValue = "&d";
          oKey.SetValue(strKey, oValue);
           /\* You can also get the value in registry by following line of code
              string strValue=oKey.GetValue (strKey).ToString();\*/
           oKey.Close();
    

    But, I think this will modify Server machine's registry value not client machine's. Is their any other way to cop-up with this issue?? Any help will be greatful. Thanks,

    Anand Desai Developer Atharva Infotech

    ASP.NET help sysadmin windows-admin question

  • "asp:fileupload" control is not working
    A Anand Desai

    Hi coders, I am working in .NET Framwork 3.5 rightnow. I am using "asp:fileupload" control to upload files on server on one of my page. but what's happening is: first I select any file through 'FileUpload' control, then when my page goes through "PostBack" event (that is when I change something else after selecting file), the control is reset to its null value and at submit I am not getting any file to save. Please help me to understand if I am missing something. Thanks,

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp sysadmin help

  • How to assign a perticular page as https:// ???
    A Anand Desai

    Hi, I know how to make whole site in Secured HTTP (https). but I want to know how I can have only one page as https:// and all other pages of that site is in http:// ???? Like, in any shopping site, all product display pages should be in http:// which is faster but payment gatway page must be in https:// which ensures security. please help. Thanks for any help.

    Anand Desai Developer Atharva Infotech

    ASP.NET security help tutorial question

  • Want to display HTML file in aspx page
    A Anand Desai

    Colin Angus Mackay wrote:

    MapPath to return the Physical path as seen internally on the server.

    I am using localhost anyways. and i think, on web server also, MapPath should work properly. Thanks.

    Anand Desai Developer Atharva Infotech

    ASP.NET html wpf sysadmin help

  • Want to display HTML file in aspx page
    A Anand Desai

    Hi coders, I want to display one HTML file contents in my aspx page. I am using for that. what I have written is: aspx page: <iframe frameborder="no" id="htmlAboutUs" style="width:100%; height:500px;" runat="server" scrolling="no"> cs file:

    htmlAboutUs.Attributes["src"] = Server.MapPath(FolderName + "/styles/About-Us.html");

    where FolderName is comming from session. Its not working but. its showing blank page in result(not even "Page Not Found"). Then I tried another one: FileStream fs = new FileStream(Server.MapPath(FolderName + "/styles/About-Us.html"), FileMode.Open); byte[] data = new byte[fs.Length]; fs.Read(data, 0, (int)fs.Length); fs.Close(); string dataString = Encoding.UTF8.GetString(data); htmlAboutUs.InnerText = dataString; It is also not working. I have checked that its bringing correct data in dataString but not displaying. mean my file contents are properly read but its not assigned to iframe. Please give some gidence. Thanks for any help.

    Anand Desai Developer Atharva Infotech

    ASP.NET html wpf sysadmin help

  • authorization in asp.net using sql databse
    A Anand Desai

    Instead using .NET server control for menu, use JavaScript for menu creation. It will ease checking an also provide better design with explicit css than in-built tamplets.

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp asp-net database sql-server sysadmin

  • authorization in asp.net using sql databse
    A Anand Desai

    Hi,

    tejesh123 wrote:

    The resources/access rights are stored in sql server which maps to group/user

    Create session variables each for every right (like bit 1 for authorized and 0 for not). After login check for those in database and according to that set the session variables.

    tejesh123 wrote:

    Authorization is required at the menus

    Check for those variables while loading menu, if true then show link and otherwise.

    tejesh123 wrote:

    also it must able protect the user from directly opening the pages by typing in the url.

    At !PostBack, check if session variables have values or not and at not, redirect to Home Page. note: create all variables in one .cs page and render that whole page as Session (eg. SessionVariables sp = new SessionVariables(); sp = session["SessionVariables"]; where session["SessionVariables"] is created in previous page like session["SessionVariables"] = sp;) Hope this helps!!!

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp asp-net database sql-server sysadmin

  • Display changes with screen resolution
    A Anand Desai

    Hi coders, I dont know if this question is suitable with this forum because I dont know my problem is causing because of ASP.NET or it is some CSS problem. I am working on .NET 3.5. I have a .aspx page with lots of DIVs. When I run my project, it rus properly and displyed properly if my screen resolution is 1024*768... but when i change my screen resolution to any other value, some DIVs move here n their randomly. I couldnt figure out the reason after many tries. I am sure my HTML coding is perfect ( all DIVs and other tags are closed properly). I would be thankful for any help and concern. Thanks,

    Anand Desai Developer Atharva Infotech

    Web Development help csharp html css asp-net

  • Display Changes with Screen Resolution
    A Anand Desai

    Hi coders, I dont know if this question has something to do with ASP.NET because I dont know my problem is causing because of ASP.NET or it is some CSS problem. I am working on .NET 3.5. I have a .aspx page with lots of DIVs. When I run my project, it rus properly and displyed properly if my screen resolution is 1024*768... but when i change my screen resolution to any other value, some DIVs move here n their randomly. I couldnt figure out the reason after many tries. I am sure my HTML coding is perfect ( all DIVs and other tags are closed properly). I would be thankful for any help and concern. Thanks,

    Anand Desai Developer Atharva Infotech

    ASP.NET help csharp html css asp-net

  • How to ocreate folder though coding???
    A Anand Desai

    Thanks Navneeth!! BTW, thats very usual thought and it did come to my mind also. but this is in-house application, so only 4-5 people will use this and also, folder creation will not be usual for them also, as every new file wont need new folder. (sorry, I cant disclose my project so wont be able to explain in detail) Thanks though for helping and thinking for me!!!

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp help tutorial question

  • How to ocreate folder though coding???
    A Anand Desai

    Hi coders, I am using .NET 3.5 framework. I'm working on a file upload project. What I want to do is give the user the ability to enter a directory name, check to see if it already exists and if not create the folder and upload the files their. What namespaces should I be using? Am I correct in presuming the directory that will house these "user-created directories" will need to have write permissions assigned to it? Thanks for any help in advance.

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp help tutorial question

  • cannot bind gridview to a second sqldatasource programatically
    A Anand Desai

    Use loaded DataSets to load your grid at runtime. It seems very easy

    Anand Desai Developer Atharva Infotech

    ASP.NET help

  • javascript
    A Anand Desai

    Yes, sorry for that. it was my mistake

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp javascript question

  • How to include js file through .cs????
    A Anand Desai

    Thanks, your code helped me to include css file also, i was not able to include css file through cs by my code. All i did is:

    protected void Page_Init(object sender, EventArgs e)
    {
    Servicepath = "xmls/saltours/general/services.xml";
    string jspath = "scripts/companyname/main.js";
    String csname = "PageLoadScript";
    Type cstype = this.GetType();
    ClientScriptManager cs = Page.ClientScript;
    cs.RegisterClientScriptInclude(cstype, csname, ResolveClientUrl("~/" + jspath));
    ClientScript.RegisterClientScriptBlock(typeof(PackageList), "one", "");
    ClientScript.RegisterClientScriptBlock(typeof(PackageList), "two", "");
    }

    and I got what was required.... Thanks,

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp help tutorial javascript xml

  • How to include js file through .cs????
    A Anand Desai

    Thanks buddy

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp help tutorial javascript xml

  • javascript
    A Anand Desai

    window.open("http://....");

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp javascript question

  • How to include js file through .cs????
    A Anand Desai

    Thanks Rajeesh, It is another good and shorter way, let me try by urs way, it'll save my time. Thanks for help.

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp help tutorial javascript xml

  • How to include js file through .cs????
    A Anand Desai

    Dont bother for this question friends, i have solved it myself. all i did is:

    string jspath = "scripts/" + this.company + "/main.js";
    String csname = "PageLoadScript";
    Type cstype = this.GetType();
    ClientScriptManager cs = Page.ClientScript;
    cs.RegisterClientScriptInclude(cstype, csname, ResolveClientUrl("~/" + jspath));

    Thanks friends and use this if any one is faciong this problem.

    Anand Desai Developer Atharva Infotech

    ASP.NET csharp help tutorial javascript xml

  • How to include js file through .cs????
    A Anand Desai

    Hi friends, I am using .NET 2008 version. I want to include my js files, but not by standard way like '' but from .cs file. The problem is in above example, "companyname" can change and its comming from another xml file, which i am reading in .cs, so i have to give source of js file in cs.:confused: I have found 1 function "RegisterClientScriptInclude" in C#, but its not working. :( Please any one can help me to perform my task or please show me how to use "RegisterClientScriptInclude" function. Thanks for any help in advance. Happy Coding.:rose: Anand Desai Developer Atharva Infotech

    ASP.NET csharp help tutorial javascript xml
  • Login

  • Don't have an account? Register

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