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
G

guroo13

@guroo13
About
Posts
12
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Drop Down List
    G guroo13

    Do something like this: dropdownlist.Items.Add(new ListItem("--Select Item--")); dropdownlist.AppendDataBoundItems = true; dropdownlist.datasource = somedatasource; dropdownlist.TextField = "Something"; dropdownlist.ValueField = "somefield"; dropdownlist.DataBind(); Thats all you have to do. Add an item in the list and then set AppendDataBoundItems = true before you bind the list to a data source.

    ASP.NET database question

  • create a webforn in runtime
    G guroo13

    One Idea!!! How bout if you use XML and XSLT Create xml after reading the tables in database you might be bulding forms upon and then convert xml by using xslt? If not depending on tables on database just make some rules to create xml which will represent a form and then convert that through xslt? What do you think?

    ASP.NET question

  • Combo box Event catching
    G guroo13

    If you want to catch the event inside the user control itself, that will not be a problem. For that you can double click on the combobox while in design mode and enviorment will auto generate the handler for the SelectedIndexChanged event by default in side the code behind for .ascx file. But don't forget to set the "AutoPostBack" property of the dropdownbox to true. If you want to handle SelectedIndexChanted even inside your page where you are using this user control then the quickest souloution is as follows: Create a public property in your user control like: public DropDownList List { return ddlYourTargetComboBox; } on your page do something like: ucYourUserControlInstance.List.SelectedIndexChanged += new EventHandler(list_SelectedIndexChanged); void list_SelectedIndexChanged(object sender, EventArgs e) { //Implement logic here } Hope this helps

    ASP.NET help

  • RSACryptoServiceProvider
    G guroo13

    Hi, I am trying to use RSACryptoServiceProvider in my ASP.NET application to access keys from a MachineKeyStore on my computer, running windows xp and IIS 5. I created machinekeystore like following in Visual Studio 2005 Command Prompt: aspnet_regiis -pc "CustomKeys" -exp (command was successful) Then I executed following command because I am impersonating my web application with a non-default user: aspnet_regiis -pa "CustomKeys" "domain\auserforapplication" (command was successful) Then I worte the following code: public partial class Examples_EncryptionExample : System.Web.UI.Page { CspParameters CspParam; string publicXmlString = string.Empty; string privateXmlString = string.Empty; protected void Page_Load(object sender, EventArgs e) { try { byte [] encrypted; string decrypted; UnicodeEncoding ByteConverter = new UnicodeEncoding(); encrypted = EncrptData("data to encrypt"); Response.Write(System.Text.Encoding.Unicode.GetString(encrypted)); decrypted = DecryptData(encrypted); Response.Write(decrypted); } catch (Exception ex) { } } public string DecryptData(byte [] data) { RSACryptoServiceProvider RsaCsp; byte[] decryptedData; RsaCsp = new RSACryptoServiceProvider(); RsaCsp.FromXmlString(privateXmlString); decryptedData = RsaCsp.Decrypt(data, false); return System.Text.Encoding.Unicode.GetString(decryptedData); } public byte [] EncrptData(string data) { RSACryptoServiceProvider RsaCsp; RSACryptoServiceProvider RsaCsp2; UnicodeEncoding ByteConverter = new UnicodeEncoding(); CspParam = new CspParameters(); CspParam.KeyContainerName = "CustomKeys"; CspParam.Flags = CspProviderFlags.UseMachineKeyStore; byte[] encryptedData = ByteConverter.GetBytes(data); RsaCsp = new RSACryptoServiceProvider(CspParam); //Getting public key publicXmlString = RsaCsp.ToXmlString(false); //Getting private key privateXmlString = RsaCsp.ToXmlString(true); RsaCsp2 = new RSACryptoServiceProvider(); RsaCsp2.FromXmlString(publicXmlString); encryptedData = RsaCsp2.Encrypt(System.Text.Encoding.Unicode.GetBytes(data), false); return encryptedData; } } The problem over here is that when ever I try t

    ASP.NET csharp asp-net visual-studio design windows-admin

  • Enterprise Library 2.0
    G guroo13

    sorry, I copied and pasted the following b4: type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/d:SANDBOX,DEBUG" /> in the last line in codedom tag its /d:TRACE

    C# database sysadmin security collaboration tools

  • Enterprise Library 2.0 (Database Listener) [modified]
    G guroo13

    Hello, I am developing a web app and trying to use Enterprise Library 2.0. I am using it for logging for now. I achived the logging on a flat file but when I tried to start doing the logging by using a DataBase Listener. I failed. Here's how I am using it after including all possible references to my web app. I configured a datasource with following attributes setup: -Server (my server name) -Database (my database in my server) -Integrated Security (I used API.. something, false, true and I even tested after removing this tag aswell). -user (my user name) -pwd (my password) Then I configured a Database Listner and gave the reference of my datasource. Then I configured a Logging block by adding different categories and then I added reference to my Database listner in categories. I also tested by adding and removing following in web.config: system.codedom compilers compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/d:TRACE" compilers system.codedom ---------------- After doing this all when I try to log an entry after specifing the category to the entry and other required attributes. NOTHING HAPPENS in tables I generated after running the script file provided by Best Patterns and Practices team. I couldnt log any data. Is there anybody who can help me or tell me what I am doing wrong? Thanks in Advance -- modified at 21:13 Tuesday 25th July, 2006

    Web Development csharp database sysadmin security debugging

  • Enterprise Library 2.0
    G guroo13

    Hello, I am developing a web app and trying to use Enterprise Library 2.0. I am using it for logging for now. I achived the logging on a flat file but when I tried to start doing the logging by using a DataBase Listener. I failed. Here's how I am using it after including all possible references to my web app. I configured a datasource with following attributes setup: -Server (my server name) -Database (my database in my server) -Integrated Security (I used API.. something, false, true and I even tested after removing this tag aswell). -user (my user name) -pwd (my password) Then I configured a Database Listner and gave the reference of my datasource. Then I configured a Logging block by adding different categories and then I added reference to my Database listner in categories. I also tested by adding and removing following in web.config: ---------------- After doing this all when I try to log an entry after specifing the category to the entry and other required attributes. NOTHING HAPPENS in tables I generated after running the script file provided by Best Patterns and Practices team. I couldnt log any data. Is there anybody who can help me or tell me what I am doing wrong?

    C# database sysadmin security collaboration tools

  • Reflection with static inherited methods
    G guroo13

    Thanks alot Guffa for answering!! seems like I am out of luck :(

    C# help question

  • Reflection with static inherited methods
    G guroo13

    Hi Josh, I really appriciate that you answered my question. I tried by taking off DeclaredOnly BindingFlag but it still didnt work. Any other suggestion? By the way, I was able to see the methods declared public in parent class, but I was not able to see the public static method declared in parent class. Thank you

    C# help question

  • Extract Relationship from MS SQL
    G guroo13

    Hi Exprets, I am making an application using MS SQL Server and I need to know that what kind of relationships are existing between table e.g. 1-1 or 1-M. I can get the constraint's, coulumn, table, types information from INFORMATION_SCHEMA at this point but I still need to find the relationship types between tables. I am using C# and ADO.NET and the version of Database Server right now is MS SQL Server 2000 but Finally I will be utilizing MS SQL Server 2005. Any idea, suggestion, snippet? Thankx

    Database csharp database sql-server sysadmin question

  • rootCR.cer
    G guroo13

    Hello Experts, I want to read .cer file generated by RootCA. I want to encrypt scramble it with some garbage data and make .cer file unsuable, then I want to remove the garbage data from .cer file so it could be useful again. I wanna do it because if I give anybody a .cer file to install it on some machine, he should not be able to steal it. The only way this .cer file could be installed in Authority Store is by my program which gets the confirmation before removing the garbage data from a webservice and sends that webservice client's IP and username. I tried opening the file in C and C++ both couldnt read the file. Can I do it in VC++?. If I can then how? Thanks Alot in Advance

    C / C++ / MFC c++ question

  • rootCS.cer
    G guroo13

    Hello Experts, I want to read .cer file generated by RootCA. I want to encrypt scramble it with some garbage data and make .cer file unsuable, then I want to remove the garbage data from .cer file so it could be useful again. I wanna do it because if I give anybody a .cer file to install it on some machine, he should not be able to steal it. The only way this .cer file could be installed in Authority Store is by my program which gets the confirmation before removing the garbage data from a webservice and sends that webservice client's IP and username. I tried opening the file in C and C++ both couldnt read the file. Can I do it in C#. If I can then how? Thanks Alot in Advance

    C# csharp c++ question
  • Login

  • Don't have an account? Register

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