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

azam316

@azam316
About
Posts
38
Topics
23
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Asp.net 2.0 User Control or Custom Control
    A azam316

    Hi All, I would like to inquire that which would be better in the following scenario; an asp.net user control or a custom control / custom control library: I needed a property in my basic/primitive asp.net controls such as textbox, drop down lists or buttons, which i could use to assign some category to the control, which in turn i would use for access permissions to my application roles and users. This property would be similar to the TAG property that was in VB 6 controls. As we don't have such property in asp.net server controls, i have decided to customize these controls, through User Controls. But i would like your expert opinions on this approach, whether is should go with User Controls or use asp.net custom controls or an entire different approach. Kindly advice. Thanks in advance!

    ?«««DTA»»»?

    ASP.NET csharp asp-net winforms sysadmin question

  • Applying conditions in XSD
    A azam316

    Hi, I need to add, remove or make optional, some elements based on the values of an attribute of the parent element. I have an element "report" that has an attribute "investortype", which can have 3 possible values: "none", "indvidual" and "group". Now what i need is, to create/modify elements in the report element based on these 3 values. The following example will elaborate: investortype = "individual" --------------------------- investortype = "group" --------------------------- investortype = "none" --------------------- Any help or hint would be great. Also i need to know if this is even possible in XSD? Awaiting reply and Thanx in advance ☺«««DTA»»»☺

    XML / XSL help tutorial question

  • Scheduling Task
    A azam316

    i have created a console application in C#.Net. This exe calls a dts package on a sql server and that package in return generates a text file and some excel files as result. i have scheduled this through window scheduled tasks option to run daily with a domain account which is not included in the adminstrator group of the local machine. The problem is that the text file is generated but the excel files are not. But when i run the exe thru : right click> Run As> and then provide the same non admin credentials, all files including excel files are generated. Even when i log on to the system as this non admin account and run the exe directly, i get full results! Is there any privilege difference in executing a task thru the task scheculer? or am i missing something? I have also checked the event viewer and the following error was logged: "Access denied attempting to launch a DCOM Server. The server is: {00024500-0000-0000-C000-000000000046} The user is visiadmin/KARACHI, SID=S-1-5-21-854245398-2146720035-839522115-2639." visiadmin is the non admin account and KARACHI is the domain name. i have also followed the support on http://support.microsoft.com/default.aspx?scid=kb;en-us;290398 but still no results! I am using VS.Net 2003, O/S: Windows Server 2003, exe developed on C#.NET, MS Office 2003. Please help me! thanx in advance Regards ☺«««DTA»»»☺

    .NET (Core and Framework) help csharp database sql-server visual-studio

  • Web Service Issue
    A azam316

    hi everyone, I am having some problems while accessing a certain method of a web service thourgh my asp.net application. The web service exposes 2 methods 1) string GetXml(......) 2) byte[] GetBinary(string path) Method 1) runs smoothly and returns the string. While calling method 2) raises an exception (Server was unable to process request --> Object reference not set to an instance of the object) or sometimes (Server was unable to process request --> Parameter cannot be null. Parameter name InString). Another asp.net application accesses the same web service methods without any errors. The code for using the web service in this application and mine is identical, except for mine is in C# and the other one is in VB.NET Does anyone has any idea why this is happening? The web service is offlimits, so i cant debug it and it uses basic authentication. Please guide me!!! thanx in advance! ☺«««DTA»»»☺

    ASP.NET csharp asp-net sysadmin security

  • Double hop issue
    A azam316

    HTTPS a good solution, but its not an option! I cant use it as its not acceptable to the client. Do you have any other solution? Please tell me if you have!!! Still thanx a lot! ☺«««DTA»»»☺

    ASP.NET windows-admin asp-net help csharp database

  • Double hop issue
    A azam316

    I am having a double hop problem when i connect to an SQL Server located on a different machine through my asp.net application, when i use windows authentication on SQL SERVER. My IIS Authentication is also set to integerated windows authentication. The appliction is on Windows Server 2003. I have resolved this by using impersonation: in the web.config. And it works fine! The problem is that i the user id and password are in plain text which is pretty insecure! I can use the "Aspnet_setreg.exe" utility to keep the credentials in the registry...but the client is not agreeing upon it! I have also tried creating an impersonating context through the code but it did not work...dont know why? Please guide me if there is any way to do this in a secure way! thanx in advance! ☺«««DTA»»»☺

    ASP.NET windows-admin asp-net help csharp database

  • ASP.NET application deployment
    A azam316

    i AM using the Visual Studio setup project. i like the custom action idea by minhpc_bk! infact i think that its the only way to do this (when using the VS.NET setup project.) i suppose that this custom action has to be run at the commit event..right? as the web.config wont be there to edit during the installation. so if this is right, then can any of you guide me on how to use the user provided information in this custom action and how to find the path where the web.config will get installed to? some tutorials would be great!!! again thanx a lot to all of you guys! regards ☺«««DTA»»»☺

    Web Development database sysadmin csharp asp-net sql-server

  • ASP.NET application deployment
    A azam316

    hi, Can anyone please provide me with some guide or references for deploying an ASP.NET web application that uses: - Crystal Report 9 (Integerated with VS.NET 2003) - A web service deployed at some remote server. - SQL Server 2000 database I am going for a custom action to get some parameters such as database server name, database name, etc. from the user at deployment time. I want to insert these parameters in the web.config file of the application during the setup. is there any way to do this? thanx in advance ☺«««DTA»»»☺

    Web Development database sysadmin csharp asp-net sql-server

  • Viewstate
    A azam316

    thanx 4 all your opinions, matthias Regards ☺«««DTA»»»☺

    ASP.NET performance question

  • DataGrid
    A azam316

    Place the following check exactly before calling the DataGrid.DataBind() method: // Get the total number of records returned from the database table. int totalRecords = Dataset.Tables[Index].Rows.Count; int totalRecordsAssumption = DataGrid.PageSize * DataGrid.CurrentPageIndex; if( totalRecords <= totalRecordsAssumption && totalRecords != 0 ) { DataGrid.CurrentPageIndex = DataGrid.CurrentPageIndex - 1; } Hopefully this will solve your problem!! Tell me if u have any problems with it Regards ☺«««DTA»»»☺

    ASP.NET help

  • Viewstate
    A azam316

    thanx for your opinion matthias. you made a very interesting point that the ViewState should be kept smaller than 1K if possible. I would like to know that how do i determine the current size of the ViewSate for my page? thanx in advance! ☺«««DTA»»»☺

    ASP.NET performance question

  • Keeping selected row after sort
    A azam316

    i am assuming that you are sorting through the header links on top of each coloumn. if this is the case, a postback will be performed every time you sort. Hence your page will render again and any your changes will revert unless they are static or persistent. now am i no expert but the solution for your problem in my mind is the use of the viewstate. just store the selectedindex in a viewstate and extract its value when you bind your datagrid in the pageload event. hope this helps! best of luck and regards! ☺«««DTA»»»☺

    ASP.NET question database

  • Viewstate
    A azam316

    hi, my question is that can i store a dataset in the viewstate of the aspx page> i know that it is possible but will it effect the performance. keep in mind that the servers are pretty good and powerful, but the record count can be in thousands; more than 20 to 30 thousands. thanx in advance ☺«««DTA»»»☺

    ASP.NET performance question

  • Validation
    A azam316

    its pretty simple. just use a regular expression validator, and associate it with your textbox. the only tricky part is the regular expression! and luckily i have it! its: ^\w{2}\d{4}$ ive not tested thoroughly, but i think it will work. good luck! ☺«««DTA»»»☺

    ASP.NET csharp javascript css visual-studio tutorial

  • Bidirectional sorting datagrid in ASP.Net
    A azam316

    First thing you need to do is to provide each of your column, that is to be sorted, with a sorting expression. The sorting expression should be exaclty the same as the name of the field that is being binded to the column. I am assuming you have already done that. In my application i have a method called BindData( string SortExpr ). this method first creates a dataview object, initializing it to the table with data. This table is in a dataset. Then the argument SortExpr is assigned to the .sort property of the dataview. finally the dataview is assigned to the datagrid's source property. E.g. dv=new DataView(ds.Tables[0]); dv.Sort=SortingExpr; dg.DataSource=dv; dg.DataBind(); This how the grid is bind every time. The argument sortExpr is empty string for the first load. Now for the main function: For bidirectional sorting in aspx, u need to keep track of the direction to which the last sorting was performed. For this i have used ViewSate variables; one for each column. I have initialized them with 1 denoting that the last sort was in desc. order. Becareful in naming the ViewState variables. You must name them w.r.t the sorting expression of the columns for all this to work! E.g. for a column with "User" as the sorting expression initialize a viewstate as follows: ViewState["User"])==1; The follwing is the sample of my SortRecord() Method. protected void SortRecords(object sender, DataGridSortCommandEventArgs e) { string strTargetSortDirection=""; switch(e.SortExpression.ToString()) { case "User": { SetSortParameters(e.SortExpression); if((int)(ViewState["User"])==0) { strTargetSortDirection =" ASC"; } else { strTargetSortDirection=" DESC"; } break; } } CurrentSortingExpr = e.SortExpression + strTargetSortDirection; BindData(CurrentSortingExpr); } In the above method each case represents the sorting expression of a column. So the number of cases will be equal to the number of columns to be sorted. In every case first a method SetSortParameters(...) is called with the current sorting expression as the argument. This will change the viewstate value for the column and will be revered every time. The body of SetSortParameters(...) is given below: private void SetSortParameters(string trgColumnName) { if((int)(ViewState[trgColumnName])==1) { ViewState[trgColumnName]=0; } else { ViewState[trgColumnName]=1; } } I know its pretty lengthy but very simple once you get the lo

    ASP.NET tutorial csharp asp-net algorithms

  • shifting items in b/w list boxes
    A azam316

    yes. i am loading the items in the !IsPostback Block. am i doing something wrong here? plz tell me u have a solution thanx ☺«««DTA»»»☺

    ASP.NET javascript sysadmin tools help question

  • shifting items in b/w list boxes
    A azam316

    hi, i have 2 list boxes on my aspx page. i need to have a functionality that, whenever a user double clicks an item on any of the list boxes, it shifts to the other one. i am using a javascript for this purpose as there is no double click event provided. the script is working and the items do shift. but when a server web control such as a button is clicked, all shiftings made by double clicking revert. please help me. do i need to use viewstate? if i do, can anyone tell me how? if there is another way please do tell me! thanx in advance ☺«««DTA»»»☺

    Web Development javascript sysadmin tools help question

  • shifting items in b/w list boxes
    A azam316

    hi, i have 2 list boxes on my aspx page. i need to have a functionality that, whenever a user double clicks an item on any of the list boxes, it shifts to the other one. i am using a javascript for this purpose as there is no double click event provided. the script is working and the items do shift. but when a server web control such as a button is clicked, all shiftings made by double clicking revert. please help me. do i need to use viewstate? if i do, can anyone tell me how? if there is another way please do tell me! thanx in advance ☺«««DTA»»»☺

    ASP.NET javascript sysadmin tools help question

  • displaying crystal report on web form
    A azam316

    y dont u ask ur old buddy at systems Ltd. I think he might know the answer to your problem! ☺«««DTA»»»☺

    ASP.NET help question

  • Break data to multiple lines in a DataGrid
    A azam316

    hi, i'm having a problem with the dimensions of the datagrid. the problem is that one of the fields have a large data size. so when displaying large value the grid expands in very ugly way and remains nice and proper when normal size values. i have tried to fix the grid size, but it did not work for me. i was wondering, if its possible to break the large values into multiple line, so that the overall size of the grid does not change. i am using the default Label control of the grid to display the values. Changing the control is not an option. Some help please!!! thanx in advance ☺«««DTA»»»☺

    ASP.NET help css
  • Login

  • Don't have an account? Register

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