How to add login user (ASPNET) to MS SQL 2000 Desktop Engine server?
Go to drive:\Program Files\Microsoft SQL Server\80\Tools\binn Use OSQL, a command line tool. osql -S servername\instancename -E -q –Line numbers will appear EXEC sp_grantlogin ’machinename\ASPNET’ go use go EXEC sp_grantdbaccess ’machinename\ASPNET’ go EXEC sp_addrolemember ’db_owner’, ’machinename\ASPNET’ go
How to restore the browser’s scroll position after a postback?
Set the SmartNavigation attribute to true.
How do I make my TextBox positioned below a DataGrid move up or down in position as the height of the DataGrid changes?
Specify the pageLayout of the Document from GridLayout to FlowLayout, this will position the controls automatically and optimally.
Why do I get ViewState error when upgrading my application from a single web server to a web farm?
This usually happens when encryption is enabled for ViewState in all your pages but the different server machines use different Validation Keys for encrypting. Ensure that all the machines has the same validation key specified in their machine.config file. For example, add the following key: <machinekey validation=’3DES’>
How can I have multiple command buttons map to the same event or function
Simply use the same handler for the different button Click events. <asp:Button id=’Button1′ runat=’server’ Text=’Button’></asp:Button> <asp:Button id=’Button2′ style=’Z-INDEX: 103; LEFT: 8px; POSITION: absolute; TOP: 80px’ runat=’server’ Text=’Button’></asp:Button> VB.NET Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click Response.Write(‘hi you clicked ‘ + CType(sender, Button).ID) End Sub C# // In InitializeComponent this.Button1.Click += new System.EventHandler(this.Button1_Click); this.Button2.Click += new System.EventHandler(this.Button1_Click); private void Button1_Click(object sender, System.EventArgs e) { Response.Write(‘hi you clicked ‘ + ((Button)sender).ID ); }