|
it is still in beta, but will be available soon for a small cost.
the other option you have is to do a quick if(File.Exists()) { } and if true then display a button on the page that confirms the overwrite of the file. This way on the first postback you could upload the file and name it like ~filename.ext. If the answer is no then either force them to click a No button and delete the temp file or just delete it on next file upload and check. the latter option would require maintaining a list of files to be deleted, else you could have concurrency problems if this is a multi user application.
regards,
g00fy
|
|
|
|
|
can you use css in web user control? if yes how can i link the css with the webusercontrol?
|
|
|
|
|
you can use GetWebResourceUrl() and embedd the css in the assembly
then you create a HttpLink and set its href attribute to the GetWebResourceUrl(typeof(this), "path_to_resource.css")
regards,
g00fy
|
|
|
|
|
Also, any style sheets in the .aspx file that calls in the user control get applied to it as well (but you won't see it in the designer obviously).
|
|
|
|
|
Hi I have a problem with Opera Browser Detection using ASP.NET
Here is the code:
Dim bobj As System.Web.Mobile.MobileCapabilities = CType(Request.Browser, System.Web.Mobile.MobileCapabilities)
bobj.IsMobileDevice is True
and bobj.InputType = "telephoneKeypad"
If I change the Opera Browser identification to IE or Mozilla everything is allright:
bobj.IsMobileDevice is False
and bobj.InputType = "keyboard"
I'm using Opera 9, I test this on Opera 8.5 and it works fine, but the new version is identify as mobile device in ASP.NET
Where is the problem?
I asked this question in Opera forum and only got this answer:
"With asp.net of course, since that version isn't detecting Opera 9 properly"
|
|
|
|
|
Which version of the ASP.NET are you using? If it's 1.x, you can use the browserCaps element in the Web.config file to detect the Opera 9. In case of the 2.0, you can use the browser file instead.
|
|
|
|
|
I'm using 1.1
Here is the machine.config browserCaps element for opera:
<case match="Opera[ /](?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
browser=Opera
version=${version}
majorversion=${major}
minorversion=${minor}
frames=true
tables=true
cookies=true
javascript=true
ecmascriptversion=1.1
isMobileDevice="true"
<filter match="[4-9]" with="${major}">
ecmascriptversion=1.3
css1=true
css2=true
xml=true
<filter match="[5-9]" with="${major}">
w3cdomversion=1.0
</filter></filter><filter match="^b" with="${letters}">
beta=true
</filter></case>
So I need only to change isMobileDevice="true" to isMobileDevice="false" ?
|
|
|
|
|
Hello,
i want to set sesssion variable's value in Javascript function how is it possible? Anybody knows? Please inform me.
Regards,
AbuBakar
|
|
|
|
|
You cannot directly set the Session data with javascript, instead you may consider using AJAX and you can easily find lots of examples out there.
|
|
|
|
|
You can store in Cookie instead of session. You can set cookie value from javascript and also from asp.net code.
Regards,
Ketan.
|
|
|
|
|
The best bet is to store it in a HiddenField control, then document.getElementById to retrieve it on the client side
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi all
i am maintaining a project a have a form addrecord.aspx use FormView control having different dropdownlist with different datasource. formview control use1 sqldatasource1 to bind using visual tool.if the database table have a single or more record then formviw appear in addnew and edit mode.if there is not record in database table the formview not appear. give a msg no record found. i want a interface to insert the first record if the database table has is empty. all the code used in configuration mode(html) so i am not getting when i check
IS sqldatasource is null.
if (sqldatasource ==null)
FormView1.ChangeMode(FormViewMode.Insert);
like this.....
i am not getting the event.
i got some idea from codeproject but i am not getting exact what i should do.
so have explain my problem.
please send me the suggestion with code.
Thanks in advance .
srinandan
|
|
|
|
|
cant you check in the Selecting event and determine if you have anything to show ?
regards,
g00fy
|
|
|
|
|
srinandan.. wrote: all the code used in configuration mode(html)
What do you mean by this?
srinandan.. wrote: if (sqldatasource ==null)
Why do you check the SqlDataSource instance?
What I said in the other post is to use the Selected[^] event of the SqlDataSouece control, and do a checking on the e.AffectedRows .
|
|
|
|
|
thanks to solve my problem
be connect.........
|
|
|
|
|
hai
can we see the code of methods and etc of a system namespace if yes how?
plz help
mam_snigdha
|
|
|
|
|
disassemble it. google is your friend here
regs,
g00fy
|
|
|
|
|
How to use mouseover event on datalist control.
thanx
|
|
|
|
|
I have a button on an aspx file called page A. so when i click the button, page B will pop up and need to send a command to printer to print the page B, sp can somebody share the coding for me how i code the printer function ? Thanks..
regards,
Ken
|
|
|
|
|
|
Hi all,
I am running ASP 2 on IIS 5.1 XPPRO and I have enabled customErrors, so i though i would see how they look locally and set mode=On.
this is the code that fires the exception:
protected void AddToQuoteButton_Click(object sender, ImageClickEventArgs e)
{
try
{
Guid guid = new Guid(Request.QueryString["id"]);
QuoteManager.AddToQuote(Page, guid);
}
catch (Exception ex)
{
throw new Exception("Illegal Product Code in query string.", ex);
}
}
and this is the custom 500 error page logic
public partial class _500 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(Server.GetLastError() != null)
{
string error = Server.GetLastError().Message;
ErrorLabel.Text = error;
Server.ClearError();
}
}
}
so i load a page which requires a Guid on the querystring (but i chop some of the guid off) then click the button whose handler is above, and it goes to the 500.aspx page but Server.GetLastError() is always null.
note: it is suppose to go to 500.aspx on load but i disabled that to do some testing.
why is this?
kind regards,
g00fy
-- modified at 2:02 Thursday 13th July, 2006
this is the web.config section
<customErrors mode="On" defaultRedirect="~/500.aspx">
<error statusCode="404" redirect="~/404.aspx"/>
</customErrors>
|
|
|
|
|
Try above code in Page_Error event, rather than Page_Load
It always return null in Page_Load
Kumar Prabhakar
|
|
|
|
|
|
thank you both
regards,
g00fy
|
|
|
|
|
My problem is like this.
In a page i have controls to add contacts
FirstName
Lastname
Address
Zip etc..
The page has two buttons "Add " and "Save "
+ on clicking Add button the content in the controls need to be stored temporarly in client client. And listed in a table below. Its also possible to delete an item from Added list.
+ on clicking Save all contacts stored temporarily need to be submitted to server and update to the database
means post back must occur only on clicking "Save "
How to do this. It must support cross browser.
|
|
|
|