System.DateTime dt1 = new System.DateTime(2011, 1, 31, 12, 0, 0); System.DateTime dt2 = new System.DateTime(2011, 2, 30, 12, 0, 0); // Option One System.TimeSpan diff = dt1 - dt2; // Option two System.TimeSpan diff = dt1.Subtract(dt2); Console.WriteLine("Diff in days " + diff.Days); Console.WriteLine("Diff in total days " + diff.TotalDays); Console.WriteLine("Diff in hours " + diff.Hours); Console.WriteLine("Diff in minutes " + diff.Minutes); Console.WriteLine("Diff in seconds" + diff.Seconds);
This is a blog where you are going to find tips or solution that are going to be helpful in the technology environment.
Monday, January 31, 2011
Calculating Date Difference in C#
In this example we show two ways to calculate the difference between two dates:
Wednesday, January 26, 2011
Search option starts double click a folder or drive
This usually happens after adding/modifying the File Folder or Drive entries via the Folder Options File Types dialog, as an attempt to add additional context menu items such as Command Prompt here, Print Directory for folders or drives. To fix it you have two options.
Using the command window:
- Click start
- Click Run
- Type on the command window: regsvr32 / i shell32.dll
Using the registry:
- Open the registry editor
- Navigate to:
- HKEY_CLASSES_ROOT \ Directory \ shell
- HKEY_CLASSES_ROOT \ Drive \ shell
- On the right pane click the default value
- Click modify in the Edit menu
- Type in the value data box none
- Click OK
Source:
http://windowsxp.mvps.org/searchwindow.htm
Friday, January 21, 2011
How to get combined columns NOT IN another table
Lets say we have two tables:
- TableA
- item_no
- upc
- TableB
- item_no
- upc
One item_no can have one or more upcs
On the TableA we have 150 records, on the TableB we have 100 records.
We want to know which items with its upc doesn't exist on the TableB.
The easiest way to solve the problem is join the two columns to manipulate them as one:
-- Example to find rows not in other table SELECT TableA.item_no + '@' + TableA.upc FROM TableA WHERE TableA.item_no + '@' + TableA.upc NOT IN ( select TableB.item_no + '@' + TableB.upc FROM TableB )
Friday, January 14, 2011
Controls for windows mobile 6.x
This is a list of some available controls for windows mobile 6.x
Fluid – Windows Mobile 6.x Touch Controls
Fluid is a .NET 2.0 control library for Windows Mobile 6.0/6.1 with touch controls.
Price
Free, open source.
Image
Code example
Home site
http://fluid.codeplex.com/
Windows Mobile Password Safe
Password Safe is a .NET 2.0 Mobile application that allows you to keep your passwords in your mobile secured with the top secure AES encryption. It provides a nice touch surface with gestures, and can be completely used without a stylus, except when you're writing or editing new passwords.
Price
Free, open source
Image
Code example
http://www.codeproject.com/KB/windows/MobilePasswordSafe.aspx
Touch Controls Suite 2
Touch Controls Suite 2 is the leading touch UI component suite that allows software developers to create graphically stunning, highly intuitive touch screen user interfaces for Windows Mobile Smartphone applications that are based on the Microsoft .NET Compact Framework (.NETCF).
Price
$99.00
Image
Source example
http://www.mirabyte.com/en/products/touch-controls-suite/
Smart Device Framework
The Smart Device Framework is aimed at developers wanting to simplify and reduce the cost of their development experience using the .NET Compact Framework. By providing useful extensions the core .NET Compact Framework class libraries, the Smart Device Framework enables developers to concentrate on building core application functionality.
Price
Free / $50 / $500
Image
Home site
http://opennetcf.com/CompactFramework/Products/SmartDeviceFramework/tabid/65/Default.aspx
Fluid – Windows Mobile 6.x Touch Controls
Fluid is a .NET 2.0 control library for Windows Mobile 6.0/6.1 with touch controls.
Price
Free, open source.
Image
Code example
private void Form1_Load(object sender, EventArgs e) { //Main Panel FluidPanel mainPanel = new FluidPanel(); mainPanel.Bounds = new Rectangle(0, 0, 240, 300); mainPanel.BackColor = Color.Red; mainPanel.GradientFill = true; mainPanel.GradientFillOffset = 30; mainPanel.ForeColor = Color.White; mainPanel.ShowMaximized(); fluidHost1.Add(mainPanel); //Label FluidLabel h1 = new FluidLabel("Fluid サンプル", 0, 0, 240, 40); h1.ShadowColor = Color.Black; h1.ForeColor = Color.White; h1.Alignment = StringAlignment.Center; h1.LineAlignment = StringAlignment.Center; h1.Font = new Font(FontFamily.GenericSansSerif, 12f, FontStyle.Bold); h1.Anchor = FluidControl.AnchorTLR; fluidHost1.Add(h1); // FluidButton okBtn = new FluidButton("OK", 70, 200 - 40, 100, 32); okBtn.BackColor = Color.Black; //okBtn.Click += new EventHandler(okBtn_Click); okBtn.ForeColor = Color.White; okBtn.Anchor = FluidControl.AnchorBL; fluidHost1.Add(okBtn); }
Home site
http://fluid.codeplex.com/
Windows Mobile Password Safe
Password Safe is a .NET 2.0 Mobile application that allows you to keep your passwords in your mobile secured with the top secure AES encryption. It provides a nice touch surface with gestures, and can be completely used without a stylus, except when you're writing or editing new passwords.
Price
Free, open source
Image
Code example
void delPasswordButton_Click(object sender, EventArgs e) { passwordToRemove = passwordsListBox.SelectedPassword; if (passwordToRemove != null) { MessageDialog dialog = new MessageDialog(); dialog.Message = "Delete Password?"; dialog.Result += new EventHandlerHome site(dialog_Result); dialog.ShowModal(ShowTransition.FromBottom); } } void dialog_Result(object sender, Fluid.Classes.DialogEventArgs e) { switch (e.Result) { case System.Windows.Forms.DialogResult.OK: ListBuilder.Instance.DeletePassword(passwordToRemove); UpdatePasswords(); this.GoBack(); break; } }
http://www.codeproject.com/KB/windows/MobilePasswordSafe.aspx
Touch Controls Suite 2
Touch Controls Suite 2 is the leading touch UI component suite that allows software developers to create graphically stunning, highly intuitive touch screen user interfaces for Windows Mobile Smartphone applications that are based on the Microsoft .NET Compact Framework (.NETCF).
Price
$99.00
Image
Source example
private void loadList(AnimationDirection ad, AnimationType at) { //XmlNodeList lName = root.GetElementsByTagName("name"); //XmlNodeList lDesc = root.GetElementsByTagName("desc"); //TreeNode RootNode = new TreeNode(); touchListBox1.PrepareAnimation(); touchListBox1.Items.Clear(); touchListBox1.BackColor = System.Drawing.SystemColors.InactiveCaption; //System.Drawing.SystemColors.ControlDark; //for (int i = 0; i < lName.Count; i++) for (int i = 0; i < root.ChildNodes.Count; i++ ) { TouchListDefaultItem di = getItemList(root.ChildNodes[i]["name"].InnerText, root.ChildNodes[i]["desc"].InnerText, i); touchListBox1.Items.Add(di); TouchListHeaderItem hi = getItemSpacer(); touchListBox1.Items.Add(hi); } //animationType = AnimationType.atSlide; //touchListBox1.Refresh(); touchListBox1.UpdateList(); // (AnimationDirection.adLeft); //(false); //(ad, at, false); }Home site
http://www.mirabyte.com/en/products/touch-controls-suite/
Smart Device Framework
The Smart Device Framework is aimed at developers wanting to simplify and reduce the cost of their development experience using the .NET Compact Framework. By providing useful extensions the core .NET Compact Framework class libraries, the Smart Device Framework enables developers to concentrate on building core application functionality.
Price
Free / $50 / $500
Image
Home site
http://opennetcf.com/CompactFramework/Products/SmartDeviceFramework/tabid/65/Default.aspx
Programatically make xml tags look aligned
The next code is useful for making your XML tags a little more readable by aligning the tags.
public static String xmlAligned(String Xml) { String Result = Xml; if (Xml.Length != 0) { try { // Load the XmlDocument with the XML variable XmlDocument D = new XmlDocument(); D.LoadXml(Xml); MemoryStream MS = new MemoryStream(); XmlTextWriter W = new XmlTextWriter(MS, System.Text.Encoding.Unicode); // Format the XML document W.Formatting = Formatting.Indented; // Write the Xml into a formatting XmlTextWriter D.WriteContentTo(W); W.Flush(); MS.Flush(); // Rewind the MemoryStream in order to read its contents. MS.Position = 0; // Read MemoryStream contents StreamReader SR = new StreamReader(MS); // Get the text String FormattedXml = SR.ReadToEnd(); // Get the results Result = FormattedXml; try { // Close all the resources used MS.Close(); MS = null; W.Close(); W = null; } catch { } } catch { } } // Return the aligned XML return Result; }
XML Programatically make xml tags look aligned
The next code is useful for making your XML tags a little more readable by aligning the tags.
public static String xmlAligned(String Xml) { String Result = Xml; if (Xml.Length != 0) { try { // Load the XmlDocument with the XML variable XmlDocument D = new XmlDocument(); D.LoadXml(Xml); MemoryStream MS = new MemoryStream(); XmlTextWriter W = new XmlTextWriter(MS, System.Text.Encoding.Unicode); // Format the XML document W.Formatting = Formatting.Indented; // Write the Xml into a formatting XmlTextWriter D.WriteContentTo(W); W.Flush(); MS.Flush(); // Rewind the MemoryStream in order to read its contents. MS.Position = 0; // Read MemoryStream contents StreamReader SR = new StreamReader(MS); // Get the text String FormattedXml = SR.ReadToEnd(); // Get the results Result = FormattedXml; try { // Close all the resources used MS.Close(); MS = null; W.Close(); W = null; } catch { } } catch { } } // Return the aligned XML return Result; }
Thursday, January 13, 2011
XML reserved characters
XML reserves certain characters, including less-than (<), greater than (>), and ampersand (&).
To express these characters in your document data, use the equivalent character entity:
less-than (<) | < |
greater than (>) | > |
ampersand (&) | & |
Here is an XML document fragment that uses character entities:
<equation> x < 2 </equation> <rhyme> Jack & Jill </rhyme>
Alternatively, data can be protected from the XML parser in a CDATA section.
Use a CDATA section to escape text that would otherwise be recognized as markup.
<comedians> <comedian> <![CDATA[Abbott & Costello]]> </comedian> <comedian> <![CDATA[Laurel & Hardy]]> </comedian> <comedian> <![CDATA[Amos & Andy]]> </comedian> </comedians>
Source:
https://studio.tellme.com/general/xmlprimer.html
GridView.RowDataBound the last opportunity to access the data item
Before the GridView control can be rendered, each row in the control must be bound to a record in the data source. The RowDataBound event is raised when a data row (represented by a GridViewRow object) is bound to data in the GridView control. This enables you to provide an event-handling method that performs a custom routine, such as modifying the values of the data bound to the row, whenever this event occurs.
A GridViewRowEventArgs object is passed to the event-handling method, which enables you to access the properties of the row being bound. To access a specific cell in the row, use the Cells property of the GridViewRow object contained in the Row property of the GridViewRowEventArgs object. You can determine which row type (header row, data row, and so on) is being bound by using the RowType property.
A GridViewRowEventArgs object is passed to the event-handling method, which enables you to access the properties of the row being bound. To access a specific cell in the row, use the Cells property of the GridViewRow object contained in the Row property of the GridViewRowEventArgs object. You can determine which row type (header row, data row, and so on) is being bound by using the RowType property.
void CustomersGridView_RowDataBound(Object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { // Display the company name in italics. e.Row.Cells[1].Text = "" + e.Row.Cells[1].Text + ""; } }
GridView.RowDataBound the last opportunity to access the data item
Before the GridView control can be rendered, each row in the control must be bound to a record in the data source. The RowDataBound event is raised when a data row (represented by a GridViewRow object) is bound to data in the GridView control. This enables you to provide an event-handling method that performs a custom routine, such as modifying the values of the data bound to the row, whenever this event occurs.
A GridViewRowEventArgs object is passed to the event-handling method, which enables you to access the properties of the row being bound. To access a specific cell in the row, use the Cells property of the GridViewRow object contained in the Row property of the GridViewRowEventArgs object. You can determine which row type (header row, data row, and so on) is being bound by using the RowType property.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx
A GridViewRowEventArgs object is passed to the event-handling method, which enables you to access the properties of the row being bound. To access a specific cell in the row, use the Cells property of the GridViewRow object contained in the Row property of the GridViewRowEventArgs object. You can determine which row type (header row, data row, and so on) is being bound by using the RowType property.
void CustomersGridView_RowDataBound(Object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { // Display the company name in italics. e.Row.Cells[1].Text = "" + e.Row.Cells[1].Text + ""; } }Source:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx
Wednesday, January 12, 2011
HTC Tilt 2 (Touch Pro 2)
If you multitask at all hours and in all places, the HTC Tilt™ 2 is for you. This phone is a power tool. It works as hard as you do.
- Start a crystal-clear conference call from anywhere. Choose who you want on the call, get them all on the line, and then flip the phone over to turn on your speakerphone.
- Wherever you go, there they are. Catch up with every message from any one person—their calls, SMS, emails, Facebook® status updates, everything—all in one place.
- Slide, tilt, and get comfortable. A slide-out keyboard and a tilting 3.6-inch screen let you read, watch, and type anywhere, in a desk chair, on a bar stool, or even from an aisle seat.
- Mix business with pleasure. Get everything you need for work and play, from Microsoft® Office Mobile to third-party apps to a 3.2 MP video camera.
Useful links
Tuesday, January 11, 2011
TreeView.ImageIndex is not keeping the image
Problem:
I want to keep the original image when a node is selected on the TreeView, but whenever a node is selected, it's image changes.
Solution:
You should set a node's ImageIndex so it will stay there. TreeView::SelectedImageIndex is a specific image that is used when a node is the selected node. For example, maybe you have a folder icon for all unselected nodes, but when you have a node selected you want that folder to look like an "open" folder. That is where you can use the SelectedImageIndex.
I want to keep the original image when a node is selected on the TreeView, but whenever a node is selected, it's image changes.
Solution:
You should set a node's ImageIndex so it will stay there. TreeView::SelectedImageIndex is a specific image that is used when a node is the selected node. For example, maybe you have a folder icon for all unselected nodes, but when you have a node selected you want that folder to look like an "open" folder. That is where you can use the SelectedImageIndex.
Monday, January 10, 2011
HTC Tilt 2 hard reset
A Hard Reset restores the device to its default settings — the way it was when you first purchased it and turned it on. Any programs you installed, data you entered, and settings you customized on the device will be lost. Only Windows Mobile software and other pre-installed programs will remain.
With software:
To perform a hard reset
1.- Access the Settings Tab>All Settings>System>Clear Storage
2.- Enter 1234 and tap Yes
With the hardware of the phone:
1.- Press and hold the buttons: ON, ANSWER and HANG UP, until you see a warning message on the screen
2.- Release the buttons
3.- Press the VOLUME UP to performance the hard reset or other button to cancel
With software:
To perform a hard reset
1.- Access the Settings Tab>All Settings>System>Clear Storage
2.- Enter 1234 and tap Yes
With the hardware of the phone:
1.- Press and hold the buttons: ON, ANSWER and HANG UP, until you see a warning message on the screen
2.- Release the buttons
3.- Press the VOLUME UP to performance the hard reset or other button to cancel
Mobile - How to just use wifi and totally disable media net
There are several options to disable medianet, you have to do it specially if you don't have a data plan.
Delete the MediaNet connection
Start > Settings > Connections > Connections > Advanced > Select Networks > MEdia Net
Then click on:
Edit > Click and hold on the item next to radio button (MEdia Net).. when the popup screen (similar to windows right click) comes up click on delete. Then do the following. >> General Tab > Click the button "Delete Settings".
NOTE - You cannot delete settings for My ISP & Work Network. Which is fine.
If you ever need the settings back again.. run the Connection Setup Wizard again
Modaco Nodata
The MoDaCo No Data Utility allows you easily turn off your data connection so you don’t accidently use (especially while roaming!)
Get the application here
HD Tweak
Delete the MediaNet connection
Start > Settings > Connections > Connections > Advanced > Select Networks > MEdia Net
Then click on:
Edit > Click and hold on the item next to radio button (MEdia Net).. when the popup screen (similar to windows right click) comes up click on delete. Then do the following. >> General Tab > Click the button "Delete Settings".
NOTE - You cannot delete settings for My ISP & Work Network. Which is fine.
If you ever need the settings back again.. run the Connection Setup Wizard again
Modaco Nodata
The MoDaCo No Data Utility allows you easily turn off your data connection so you don’t accidently use (especially while roaming!)
Get the application here
HD Tweak
These tools allow you to tweak your jewel very easily, to customize it and optimize it as you want.
It includes many tweaks with descriptions. Choose your tweak, check option, and simply apply it!
Mobile - HD Tweak
Description:
These tools allow you to tweak your jewel very easily, to customize it and optimize it as you want.
It includes many tweaks with descriptions. Choose your tweak, check option, and simply apply it!
Install HD Tweak:
- According to your device, download the appropriate version on your PC.
- Plug your device on your PC via USB (Active Sync should be enabled).
- Copy the __.cab file from your PC to your device.
- Click on the cab file on your device to install it wherever you want (Main Memory or Internal Storage or Storage Card).
Use HD Tweak:
- Go to Programs folder and launch HD Tweak by clicking on the icon.
- Choose the options you want to apply on your device.
- Note: Since many options need a soft reset, you will have to restart your device to completely apply them.
Download the application here
Source http://tilt2.blownfuze.org/
These tools allow you to tweak your jewel very easily, to customize it and optimize it as you want.
It includes many tweaks with descriptions. Choose your tweak, check option, and simply apply it!
Install HD Tweak:
- According to your device, download the appropriate version on your PC.
- Plug your device on your PC via USB (Active Sync should be enabled).
- Copy the __.cab file from your PC to your device.
- Click on the cab file on your device to install it wherever you want (Main Memory or Internal Storage or Storage Card).
Use HD Tweak:
- Go to Programs folder and launch HD Tweak by clicking on the icon.
- Choose the options you want to apply on your device.
- Note: Since many options need a soft reset, you will have to restart your device to completely apply them.
Download the application here
Source http://tilt2.blownfuze.org/
Mobile - Advanced Configuration Tool
This program opens the door to your Windows Mobile device, it let’s you enable or disable many features, for example animations, menus, system cache, touch flo 3d, startups etc.
To use this program you need .NET Compact Framework 3.5
Download Advanced Configuration Tool here
To use this program you need .NET Compact Framework 3.5
Download Advanced Configuration Tool here
- User Interface
- Animate windows
- Window animations frames
- Window animations delay
- Animate menus
- Vertical scrollbar width
- Vertical scroll arrow height
- Horizontal scrollbar height
- Horizontal scroll arrow width
- Horizontal icon spacing
- Vertical icon spacing
- Icon title font size
- Menu bar font size
- Popup menu font size
- Use long delay for gestures
- Today
- Single line Date plug-in
- Show clock/battery on title bar
- Show Power icon
- Show Wireless Manager icon
- Performances
- File system cache
- File system cache size
- File system filter cache
- PNP unload delay
- PNP wait I/O delay
- Glyph cache
- Power Management
- SD Memory power management
- MMC Memory power management
- NAND Memory power management
- SIM Memory power management
- AsyncMAC power management
- IrSIR power management
- PPTP power management
- L2TP power management
- USB charging
- Show moving charge bar
- AC resuming from suspend timeout
- Battery resuming from suspend timeout
- Screen
- Show Orientation settings
- Landscape mode
- Landscape fixed
- Auto device lock
- Auto device lock timeout
- Dim backlight in unlock screen
- Backlight lock level
- Input
- Keyboard layout
- Slide wake up
- Keyboard backlight timeout
- Suggested words
- Network
- Device friendly name
- Max TCP Connect Retransmissions
- Max TCP Data Retransmissions
- TCP window size
- DHCP
- Validate server certificate
- WPA authentication
- Wi-Fi scan interval
- Wi-Fi delay after boot
- Turn off Wi-Fi if no activity
- Wi-Fi auto off timeout
- Phone
- Phone skin
- Enable video calls
- Answer using any key
- Face down mute ring
- Phone sleep during call
- Fast sleep during call
- End call delay
- Call progress idle timeout
- Call ID match
- Shows all call history in dialer
- Max entries in call history
- Call history clean period
- Show SIM contacts
- Purge SIM contacts when no SIM
- DTMF support
- Show Battery icon
- Show Band page
- Show PIN2 page
- Show NITZ page
- Show TTY page
- Show ALS page
- Use EONS
- CPHS override
- 3G prefix in operator name
- 3G prefix text
- Bluetooth
- Bluetooth device name
- OBEX
- Use Joint Stereo
- Bitpool
- Maximum supported bitpool
- Minimum supported bitpool
- Sample rate
- Audio gateway service
- Audio gateway power save
- GPS
- Assisted GPS
- Log file
- Old log file
- Max. log file size
- Data Connections
- GPRS auto attach
- GPRS disconnect
- EDGE icon
- HSDPA icon
- Legacy GPRS notification
- HSUPA support
- Private interface for Internet Sharing
- Internet Explorer
- User Agent custom base
- 4-way navigation
- ClearType
- Delay image load
- Block static ActiveX
- Play background sounds
- Show script errors
- URL Prefix
- URL suffix
- Links to keep
- Search page
- Maximum connections per server
- Proxy Auto Detection
- Messaging
- Threaded SMS
- SMS sent notification
- SMS delivery notification
- Wake up on new SMS
- SMS Unicode support
- SMS recipients limit
- Max deleted SMS
- Sync Sent Items
- SMS callback number
- SMS priority
- Show roam warning
- Calendar
- Show lunar calendar
- Show events text in Week view
- Holiday category
- Today Item
- Camera
- Save location
- Burst mode
- Theme Photo mode
- Sport mode
- Video Share mode
- GPS Photo mode
- Max size in Burst mode
- Max size in Sport mode
- Encode photos in portrait mode
- Capture Key Delay
- Key Delay
- Capture Key Delay Time
- Locations
- Program Files folder
- My Documents folder
- Application Data folder
- Desktop folder
- Programs folder
- StartUp folder
- Recent folder
- Favorites folder
- Fonts folder
- Default storage location for image files
- Default storage location for audio files
- Default storage location for video files
- Default storage location for downloads
- Internet Explorer cache location
- Internet Explorer cookies location
- Internet Explorer history location
- Task Manager
- Refresh interval
- CPU usage refresh interval
- Voice Command
- Respect key lock
- Default TTS rate
- Windows Live
- Live Search URL
- Splash screen
- MS splash screen on startup
- MS splash screen on shutdown
- Carrier splash screen on startup
- Carrier splash screen on shutdown
- MS timeout on startup
- MS timeout on shutdown
- Carrier timeout on startup
- Carrier timeout on shutdown
- HTC Animation
- Animation
- Volume
- GIF file
- WAV file
- Startup GIF file
- Startup WAV file
- Shutdown GIF file
- Shutdown WAV file
- GIF animation speed
- Play shutdown animation
- HTC TouchFLO
- Scrolling
- Cube
- Sound
- Pressure threshold
- Finger Pressure
- High scrolling speed
- Low scrolling speed
- HTC TouchFLO 3D
- Show logo
- HTC Home
- Lock position
- Always open E-mail folder
- Weather location
- Weather location code
- HTC Audio Manager
- Music player volume
- HTC Music plug-in
- Default music player
- HTC Audio Booster
- Bass Level
- Treble Level
- 3D Sound Level
- HTC Camera Album
- OK button
- Show Camera icon
- HTC AT Debug Log
- HTC Debug Log
- Log mode
- RAM size
- File index
- File size
- G-sensor
- G-sensor polling interval
- Light sensor
- Light sensor polling
- Light sensor polling interval
- Light sensor threshold
- Light sensor threshold to turn screen off
- Miscellaneous
- Security warning
- Delete CAB file after install
- Automatic daylight savings switch-over
- Show daylight saving time notifications
Soft reset to HTC Tilt 2
A soft reset basically resets the memory structure in the handheld. This recovers the device from memory conflicts, corrupted system service chains (mainly due to attempting hacks), memory leaks, and system lockups due to the "Fatal Exception" program errors. Removing the battery from the device while it is still powered on is NOT a soft reset and can actually damage the device.
A Soft Reset is performed by:
Remove the battery cover and the stylus from the device.
Insert the tip of the stylus into the reset hole located on the left side of the device (with the back of the device facing you) .
The device will reboot.
A Soft Reset is performed by:
Remove the battery cover and the stylus from the device.
Insert the tip of the stylus into the reset hole located on the left side of the device (with the back of the device facing you) .
The device will reboot.
Friday, January 7, 2011
How to pair a Motorola HS850 bluetooth headset
How to place a Motorola HS 850 bluetooth headset into paring mode:
- Close the boom to turn the unit off.
- Hold down the call button until the blue light comes on.
- While holding down the call button, swing the boom open.
- (Now you can let go of the call button.)
Wednesday, January 5, 2011
How to give permissions to write to the App_Data folder
If you get an error when trying to write programatically to the App_Data folder, that means the web application doesn't have the rights to write on it.
To resolve the issue, you should grant Full Control permission to ASPNET, NETWORK SERVICE and Internet Guest Account system accounts over App_Data folder:
1. In Windows Explorer, go to the folder, right-click on App_Data folder and choose Properties:
2. In General tab, make sure "Read-only" option is not set:
3. In Security tab, gran "Full Control" permission to ASPNET, NETWORK SERVICE and Internet Guest Account accounts:
4. Click OK. Now, ASP.NET should have enough permissions to read/write files and folders in the App_Data folder.
To resolve the issue, you should grant Full Control permission to ASPNET, NETWORK SERVICE and Internet Guest Account system accounts over App_Data folder:
1. In Windows Explorer, go to the folder, right-click on App_Data folder and choose Properties:
2. In General tab, make sure "Read-only" option is not set:
3. In Security tab, gran "Full Control" permission to ASPNET, NETWORK SERVICE and Internet Guest Account accounts:
4. Click OK. Now, ASP.NET should have enough permissions to read/write files and folders in the App_Data folder.
How to register ASP.NET on IIS after installing the .NET Framework
If you install the .NET Framework on a system that has IIS already installed, IIS is automatically configured to handle requests to ASP.NET pages.
If for some reason is not installed, there is a tool that can do the job for you.
The utility is aspnet_regiis.exe, it is located under %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\ and you should call it with the -i parameter in the command window, as showed below:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
If for some reason is not installed, there is a tool that can do the job for you.
The utility is aspnet_regiis.exe, it is located under %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\ and you should call it with the -i parameter in the command window, as showed below:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
Scroll bars in a asp .net datagrid control
There is a way to add scroll bars to a datadrig without using DIV tags, the solution is very simple, all you have to do is to put your grid inside of a panel control and set the ScrollBars attributes to "Both", see the code below:
http://www.dnzone.com
<asp:Panel ID="pn_orders" runat="server" ScrollBars="Both" Height="350" Width="500"> <asp:GridView ID="dgOrders" runat="server"> </asp:GridView> </asp:Panel>If you rather to use DIV tags, there is a great web site where you can find a simple example:
http://www.dnzone.com
How to get directory of App_Data in ASP .NET
To get the full path of the App_Data directory of your application use the next code:
string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"App_data");
string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"App_data");
Subscribe to:
Posts (Atom)