|
No, I have just asked because if there is ScriptManager on his page, then he can try with ScriptManager.RegisterStartupScript() .
|
|
|
|
|
His basic issue is probably that he's not putting quotes around a constant string. If the code he's using is not working, then ScriptManager is not going to help, it does the same thing.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yes i do have ScriptManager on my page
|
|
|
|
|
If you are trying to validate a textbox its better to add attributes to the textbox instead of using script block.Just like,
txtName.attributes.Add("onchange","return FunctionName('"+ parameter +"')");
|
|
|
|
|
You are perfectly right but i have to explicitly call that function from one of my checkbox event based on some condition.
The scenario is as below :
I am assigning text of dropdown1 to another dropdown2 , i have written javascript function for its onchange event and based on dropdown2 text i am hiding section below dropdown2 using javascript, the thing is that when i m changing value from dropdown2 then it is working fine but when i m trying to assign value of dropdown1 to dropdown2 using .Text property the section below is not getting hide because onchange event is not getting fired.
|
|
|
|
|
So why are you doing a postback and why, if you're already running your own js code, don't you just add code to hide it ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i m looking for regex that validate the extension of the uploaded file
|
|
|
|
|
Excellent. I suggest you download Expresso, and use that to build your regex. I'm not sure exactly what sort of validation you want to do ( image file, file with an extension that is three letters, what ? ), so I can't really give you an answer.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
actually i want to just validate whether the uploaded file is a video file or not
i-e .dat, .mp4,.mpegv etc
|
|
|
|
|
Of course, a file can be a video and not have a valid extension. You can use the System.IO.Path class to get the extension and do a basic string match, just call ToLower or ToUpper to make case irrelevant.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i once give an answer to someone with the same request. please search here on the forum
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
if you use the asp:fileupload control
use the
|
|
|
|
|
i m using mozilla fire fox n looking for a full path of posted file from fileUpload control of asp
string filepath= fileUpload1.PostedFile.FileName;
but
filepath only holds the file name.. no path...............
helpp plzzzzzzzzzz
|
|
|
|
|
AhmedNisar82 wrote: fileUpload control of asp
I guess you are talking about ASP.NET not ASP.
AhmedNisar82 wrote: string filepath= fileUpload1.PostedFile.FileName;
You will only get the file name.
Use it to upload the file.
FileUpload1.PostedFile.SaveAs(filpathToSave)
|
|
|
|
|
Yet another person who asks stupid questions, then does not reply when people try to help.
I suspect he wants the full path because he wants to do some sort of file operation that won't work once he deploys to a server.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: Yet another person who asks stupid questions, then does not reply when people try to help.
Boss, I did not understand what you mean by this.
By the way, I didn't voted for this.
[Edit]Now I have voted 5.[/Edit]
Thanks
modified on Wednesday, August 5, 2009 5:41 AM
|
|
|
|
|
I mean that his question is obviously asked because he assumes because he can write code on a dev machine that accesses the file by file path, it means that he can magically do the same thing on the server when he deploys. His post asking for more info pretty much proves that. And, so many people ask questions that basically show they know nothing about ASP.NET, then don't respond when people try to help ( this guy did eventually respond, but many do not ).
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Ya.. Got it Boss. You are absolutely correct!
|
|
|
|
|
Why would you need a file path ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i want to assign a value
oMediaManagerPro.SourceFile_Path =fuplVideo.PostedFile.FileName;
oMediaManagerPro.Video_Bitrate = 300;
oMediaManagerPro.Audio_Bitrate = 64;
oMediaManagerPro.Audio_SamplingRate = 22050;
MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MP4();
but fuplVideo.PostedFile.FileName just give the name of the file not full path.....
|
|
|
|
|
What is oMediaManagerPro ? As I suspected, it looks like you have an object on the server and want to set it to use a path on the client, which obviously won't work. I suggest buying a basic ASP.NET book and reading it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
HttpPostedFile myfile = filMyFile.PostedFile;
int fileLen = myfile.ContentLength;
byte[] myData = new byte[fileLen];
myfile.InputStream.Read(myData, 0, fileLen);
String strFilename=Path.GetFileName(myfile.FileName);
=============
NITIN SAWANT
=============
|
|
|
|
|
I have read this three times, and I still don't see how you think it answers the OPs question
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi all,
I want Regular Expression for Email Address which should accept atleast one alphabet and dot(.) names like aaa.bb@gmail.com Please help me..
|
|
|
|
|
Check this[^] out.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|