If you experienced Outlook not responding issue (e.g. showing white screen when startup), and you have Symantec Winfax application installed, try the following steps:

Go to Control Panel -> Mail -> Data Files… -> Remove Winfax entry

Then, kill Outlook and restart it. It should be working fine by now.

→ No CommentTags: Windows

After letting ASP.Net Web Administration configured my web.config. I received “sys is undefined” error on the page whenever there is AJAX control on the page. There is nothing wrong with the code. All you need to do is to ensure the following statements exist in web.config:

<location path=”ScriptResource.axd”>
<system.web>
<authorization>
<allow users=”*”/>
</authorization>
</system.web>
</location>

<add verb=”GET” path=”ScriptResource.axd” type=”Microsoft.Web.Handlers.ScriptResourceHandler” validate=”false”/#62

Here is the related link:

http://blogs.wdevs.com/sebastien.lachance/archive/2006/11/23/17758.aspx

→ No CommentTags: Programming

Create an asp:button namely “button1″.

On codebehind page, add the following:

private void Page_Load(object sender, System.EventArgs e)
{
button1.Attributes.Add(“onclick”, “jsFunc()”);
}

in which “jsFunc” is the JavaScript function you define in aspx page. With this, whenever button1 is clicked, “jsFunc” is called at client side.

→ No CommentTags: Programming

Reference: http://forums.asp.net/1072828/ShowPost.aspx

Because DataList is databound control which repeats its item template as many times as there are rows in the data source to it. Therefore contents of template are wrapped into DataList’s Items (one DataList item per row in data source) which is a naming container to its contents (to keep control ID naming scope unique with repeated controls)

You’d need to note that to locate a specific Label control, you’d first need to locate specific dataList item, and run FindControl to it (for example DataList1.Items(0).FindControl(“label2″) ), and considering the databound nature, you’d probably want to loop through all items in the DataList’s Items collection to get to the every Label control. instead of getting to one on specific row.

Iterating through all items in DataList

VB
For Each dli as DataListItem in DataList1.Items
Dim currLbl As Label=DirectCast(dli.FindControl(“label2″),Label)
‘…
Next

C#
foreach(DataListItem dli in DataList1.Items)
{
Label currLbl = (Label) dli.FindControl(“label2″);
//…
}

→ 2 CommentsTags: Programming

Normally we use to Eval method to print out value retrieved from database to HTML. For example:

asp:Label id=”lblDate” runat=”server” value=’<%# Eval(myDr["DateAdded"]) >’

Assuming “DateAdded” is a date/time field in database, the above statement returns a date/time value from database.

Now, if you would like to show only date portion of it. You should define format string within Eval, such as:

<%# Eval(myDr["DateAdded"], {0:d}) >

As mentioned in help file, the Eval function is used to define one-way (read-only) binding. There is another method called Bind, which is two-ways. We used <%# %> as data-binding expression. Another expression frequently used is <%$ %>, in which I normally use it to get keyword value from web.config, such as <%$ ConnectionStrings:myConnString %>.

→ No CommentTags: Programming

In case you still didn’t aware, there is no FOR loop in Transact-SQL (T-SQL). Anyway, you can replace it with WHILE loop, such as:

DECLARE @i int

WHILE(@i < 5)
BEGIN
– do whatever you want here –
SET @i = @i + 1
END

Remember to increment/decrement the counter. Else, you will ended up in infinite loop.

→ No CommentTags: Programming

Cookie with subkeys looks like this:

HttpCookie myCookie = new HttpCookie(“MainCookie”);
myCookie.Values.Add(“Email”, myDr["Email"].ToString());
myCookie.Values.Add(“User_Id”, myDr["Id"].ToString());
myCookie.Values.Add(“First_Name”, myDr["firstname"].ToString());
myCookie.Values.Add(“Last_Name”, myDr["lastname"].ToString());
myCookie.Expires = DateTime.Now.AddYears(1);
Response.Cookies.Add(myCookie);
[Read more →]

→ No CommentTags: Programming

I am doing ASP.Net programming (using C#) these few days and I am thinking of a way to display interactive contents without post back the page. For example, there are two DropDownList, cboCategory and cboProduct respectively. If user clicked on cboCategory, all related products under the selected category will be displayed in cboProduct. In normal ASP.Net way, it requires a PostBack to the same page.
[Read more →]

→ No CommentTags: Programming

There are occasions in which XP boot up with a black screen saying that your HAL.DLL is missing or corrupted, and you are unable to get into Windows due to this reason. To resolve this issue, you need a good HAL.dll file, which is available in “i386″ folder of Windows XP installation disc.
[Read more →]

→ No CommentTags: Windows

After installing Windows XP Service Pack 2, “Your computer might be at risk” message which appears in the system tray occasionally can be quite annoying. It is a red shield with a cross sign icon indicating that some security features are disabled on your PC.

To disable it, go to Control Panel > Security Center. Click on “Change the way Security Center alerts me” link. Uncheck 3 checkboxes inside. The icon will then disappear.

→ No CommentTags: Windows

Page 33 of 34« First...1020...3031323334


© 2006–2012 Now Eating — Sitemap

Switch to our mobile site