|
diegosendra wrote: I report a totally unrespectful behavoir from two members of this site, Guirec Le Bars and Sandeep Mewara
After following your advise to posting it as a trick I received this from these users:
Guirec Le Bars: "Not an article and not even a tip I guess..."
Sandeep Mewara: "Agree. Not even a tip."
Inmediatly the article was deleted
The word "article" implies a longer text with explanation, while a "tip/trick" entry is usually a short description of a solution. Both are available under the same link. This way, the articles all meet certain minimal quality-criteria. A tip/trick would also need some background on why you wrote it, and what problem it solves.
diegosendra wrote: I just re-submitted it and I HOPE it gets published now
I have the right to judge myself if what I write is of any help or not, and not be judged by third parties
After all, I am helping others, not trying to earn a cent from this or anything else
Aah, all registered users have the option to vote on an article, or on tips. If you meet a lot resistance, it might be better to give it a rest for a moment - it's no fun if you get a lot of hard words for one's work. Still, if you ask Sandeep how it should be formatted/worded before it's approved as a "trick" would probably give you a list of tips on the subject.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
I have developed an application using DOTNET and Oracle 11g, The application while performing load test it throws an error as seen below
"Message: Exception Message : ORA-12542: TNS:address already in use Exception : at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)at Oracle.DataAccess.Client.OracleConnection.Open()
"
The same code works well in regulat cases and breaks only during load testing when the users are 100+ accessing at the same time..Any suggestions are appreciated.
Thanks & Regards,
John
|
|
|
|
|
I want to add dynamic image button on site without ID of Image button so I am using ASP tag to generate dynamic controls with ParseControl method, It's working but event is not fired when click on Image Button
Default.aspx.cs Code
protected void Page_Load(object sender, EventArgs e)
{
string str = @"<asp:ImageButton runat=server ImageUrl=""~/close-icon (1).png"" OnClick=""click"" />";
Control c = Page.ParseControl(str);
form1.Controls.Add(c);
}
protected void click(object sender, ImageClickEventArgs e)
{
Response.Write("Image Clicl");
}
Default.aspx Code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
Please help me to solve my problem by giving code in solution.
|
|
|
|
|
you need to add command event handler for this:
try this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class dynamicimage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string str = @"<asp:ImageButton ID=""dynoimage"" ImageUrl=""~/images/about01.jpg"" runat=""server"" oncommand=""clickme"" commandname=""btn"" />";
Control c = ParseControl(str);
form1.Controls.Add(c);
((ImageButton)Page.FindControl("dynoimage")).Command += new CommandEventHandler(clickme);
}
protected void clickme(object sender,CommandEventArgs e)
{
Response.Write("Image clicked");
Label1.Text = "Image clicked";
}
}
and here is the aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dynamicimage.aspx.cs" Inherits="dynamicimage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<p>
<asp:Label ID="Label1" runat="server" Text="before click"></asp:Label>
</p>
</form>
</body>
</html>
|
|
|
|
|
hey Thnx Ashish Raj Srivastava, It's working properly
|
|
|
|
|
Hi,
I am using 51degrees to redirect to mobile but when I go to the home page www.JassimRahma.com[^] it's not redirecting to my mobile page at http://m.JassimRahma.com[^] and I am not getting any error. I tried it using my Samsung S2 and S3 and Opera Emulator.
here is my web.config:
<sectionGroup name="fiftyOne">
<section name="log" type="FiftyOne.Foundation.Mobile.Configuration.LogSection, FiftyOne.Foundation" requirePermission="false" allowDefinition="Everywhere" restartOnExternalChanges="false" allowExeDefinition="MachineToApplication"/>
<section name="redirect" type="FiftyOne.Foundation.Mobile.Configuration.RedirectSection, FiftyOne.Foundation" requirePermission="false" allowDefinition="Everywhere" restartOnExternalChanges="false" allowExeDefinition="MachineToApplication"/>
<section name="detection" type="FiftyOne.Foundation.Mobile.Detection.Configuration.DetectionSection, FiftyOne.Foundation" requirePermission="false" allowDefinition="Everywhere" restartOnExternalChanges="false" allowExeDefinition="MachineToApplication"/>
</sectionGroup>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Detector.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<fiftyOne>
<redirect firstRequestOnly="false" mobileHomePageUrl="http://m.jassimrahma.com/" timeout="20" devicesFile="~/App_Data/Devices.dat" mobilePagesRegex="mobile">
</redirect>
<log logFile="~/App_Data/Log.txt" logLevel="Info"/>
</fiftyOne>
|
|
|
|
|
I am using this code to determine if the device is mobile:
<asp:TableRow>
<asp:TableCell VerticalAlign="Top">is Mobile</asp:TableCell>
<asp:TableCell VerticalAlign="Top">:</asp:TableCell>
<asp:TableCell VerticalAlign="Top"><% Response.Write(Request.Browser.IsMobileDevice); %></asp:TableCell>
</asp:TableRow>
but I always get IsMobile = False when using my Samsung Galaxy SII or S3!
why is that? can you try it here from mobile and let me know if you'll get IsMobile = True?
|
|
|
|
|
|
Those don't work very good,
Like is robot, the searchbot detector.
I think it's uses a formula to determine the device or to detect a bot. But over time, things change, and it's hard to keep that up to date.
So figure out a different way to do it.
Looks like you may half to start collecting user agent values, and do a compare or regex against them.
Here's something
ASP.NET Mobile Device Detection[^]
|
|
|
|
|
Hi,
I am Creating a WCF Workflow Service application in .net 4.0 that doing addition,subtraction,multiplication,division.And I am having Normal ASP.Net Web Application that having two textboxes for inputs and a dropdown for Arithmetic[add,sub,mul,div] and a Button for Submit and a label for Output Result.
I dont know how to use or Configure the WCF Workflow Service to the Web Application and get the result.
Pls help me.
Thanks in Advance.
Prasyee
|
|
|
|
|
Hi,
I would like to know how can I make my site automatically create and update the sitemap.xml file? and is it better to update it for search engine optimization?
|
|
|
|
|
|
Hi,
I have the following SPF record in my host:
v=spf1 a mx -all
but reading this it recommends to have the SPF record like this:
v=spf1 mx include:mydomain.com –all
what's your advise?
|
|
|
|
|
|
-all
means that if none of the rules are ok, don't accept the email.
This will mess up your ability to send mail to all domains.
~all
means that if none of the rules are ok, do a soft error
@ 86400 IN TXT "v=spf1 ip4:192.1468.1.1/24 ~mx ~a ~all"
Means any server in the ip range of 192.168.1.1 to 192.168.1.254 can send mail, softerror if no mx record of mail server, softerror of no A PTR, softerror for all other.
If you have a small block of public ip's, then you need to use a caluclator to figure out the subnet.
taking the time to write your SPF file will tighten up your mail security, maybe reduce spam or impersonators.
just remember "-" is reject, "~" is softerror
[edit]
This is a better reference to how it works, than the other above
[how to write an SPF record^]
|
|
|
|
|
Dear All
I have a grid view with records ranging between 500-1000. it is a data bound grid with template fields. My Gird Get Bind and show data on a link button click. Till here every thing works fine. Problem starts when i click a check box in grid view. It has an checkbox change event associated with it when ever i check a check box in any row then it Shows "Unresponsive Script error". if any control which has a post back trigger associated with it always shows the same error i m not able to identify why this error is occurring and which script is making browser unresponsive or dead slow. Plzz help
ashish sharma
|
|
|
|
|
Can you use a Fiddler to see how much data is flowing for the request on check of the postback? And based on this, what is the weight per object in the data.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
I am supposed to create an data transfer utility that is to take data from an external source. in this case it's another database, and import/update data into an asp.net website database.
Now, the database and the site were created by another party and they already have an API/framework to access the database.
I've tried to write code on the site that imports the data but it sometimes times out and the app pool recycles.
How do I run a data transfer without timeouts and using the third part API so I don't have to re-write a ton of code?
|
|
|
|
|
Probably not enough information to answer your question.
1) Explain how you have tried your export/import.
Ex: Run a query, collect the data, save it to a text file.
Run a program which calls the API to import the data line by line.
etc.
2) Do you have local access to both databases?
3) What is the nature of the API ? Is this a webservice? Are your sure you are using the API as recommended by the vendor? I have a vendor supplied API which uses tons of memory if I try to load data with it. I had to break my program into chunks so that their library could free up memory in between my data load sessions. This makes me believe that they are doing some sloppy memory management (not disposing of objects)
4) You might want to check with the vendor about the proper use of their API.
5) Maybe post a code snipet here.
The folks here will try to give you an answer, but I think more details are needed.
Good luck.
|
|
|
|
|
<Columns>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:Label Text='<%#Eval("Name") %>' runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
|
|
|
|
|
|
I have a web page with a method called to display some images in the DataList control
MyImage.cs
class MyImage
{
string Name { get; set; }
byte[] Jpeg { get; set; }
}
MyImages.aspx.cs
pubic void DisplayMyImages(IEnumerable myImages)
{
this.myImagesDataList.DataSource = myImages;
this.myImagesDataList.DataBind();
}
...
protected void myImagesDataList_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item ||
e.Item.ItemType == ListItemType.AlternatingItem)
{
MyImage myImage = (MyImage)e.Item.DataItem;
Image myImageImage = (Image)e.Item.FindControl("myImageImage");
myImageImage.ImageUrl = "~/Handlers/ImageHandler.ashx";
}
}
But how to pass jpeg image to ImageHandler if it is already extracted from the database and passed to DisplayMyImages() function?
Remarks:
I do not want to save them back to files and pass the paths in a query string to ImageHandler
Having a standard query string approach is not possible as I do not want to violate model view presenter approach
Чесноков
|
|
|
|
|
Depending on how big your images are, and which browsers you need to support, you might be able to use a data URI[^].
(If you're using IE8, you're limited to 32Kb; earlier versions of IE aren't supported at all.)
myImageImage.ImageUrl = "data:image/jpeg;base64," + Convert.ToBase64String(myImage.Jpeg);
If you need to support older versions of IE, you'll need to pass a query-string to your handler. If the image is more than 32Kb, it'll be too large for a query-string, so you'll need to pass some kind of ID to allow the handler to retrieve the image.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
that is interesting approach! never thought of it before
Чесноков
modified 22-Oct-12 13:27pm.
|
|
|
|
|
hello,
Can anybody help me to insert,delete,update in datagridview in asp.net without any postback. or with webservice.
|
|
|
|