|
Hi,
I have registered a client script as
ClientScript.RegisterClientScriptBlock(this.GetType(), "script", "<script language='javascript'>alert(Hi..');</script>");
Now can I unregister this script.
Please give me a solution ASAP.
Vijay
|
|
|
|
|
tovijay.shukla wrote: I have registered a client script as
ClientScript.RegisterClientScriptBlock(this.GetType(), "script", "alert(Hi..');");
Now can I unregister this script.
There's no method to unregister a script. The solution is not to register the script in the first place.
tovijay.shukla wrote: Please give me a solution ASAP.
Hey, this is a free forum. You're not paying people for their help, so show some respect and be prepared to wait.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi i want to set size of form according to system resolution ... how to do that in windows application
Thanks & Regards,
Prashant B. Lavate
Software Engineer
Mobile : +919423872257
Pune(India)
|
|
|
|
|
Prashant B. Lavate wrote: hi i want to set size of form according to system resolution ... how to do that in windows application
Did you not notice that this is the ASP.NET forum?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
how could i embed image in a xml file. plzz provide sample code or url from where i can get the code.
tbhattacharjee
|
|
|
|
|
Not having the code but i think you need to convert image into Binary then store that binary into xml file in perticualer node
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
you´ll get into some problems when storing binary data in your xml file.
i guess the standard way performing this would be encoding your image
data to base64, store the base64 data in a CDATA node
and when you want to get back to your image, base64 decode it and you
have your image data back.
to convert your Bitmap to a base64 string try something like
<br />
private string ImageToBase64(Image image)<br />
{ <br />
MemoryStream ms = new MemoryStream();<br />
image.Save(ms, ImageFormat.Bmp);<br />
string base64 = Convert.ToBase64String(memory.ToArray());<br />
ms.Close();<br />
return base64;<br />
}
and the other direction
private Bitmap Base64ToImage(string base64)<br />
{<br />
MemoryStream memory = new MemoryStream(Convert.FromBase64String(base64));<br />
Bitmap bitmap = new Bitmap(memory);<br />
memory.Close();<br />
return bitmap;<br />
}
|
|
|
|
|
thanks a lot for great code.
tbhattacharjee
|
|
|
|
|
suppose i have image binary data in a string and i want to encode that data applying base64 logic and as well as how can i decode that image data. plzz give me some sample code.
tbhattacharjee
|
|
|
|
|
If your converting Byte to string then don't convert it
just use Convert.ToBase64String(inArray, 0, inArray.Length,
Base64FormattingOptions.InsertLineBreaks);
If you are using string convert it to byte then try this
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
I tried a simple test where I click on a tab of a TabContainer from the ASP.NET Ajax Control Toolkit 1.0 (VS 2005). The test recorder records the actions. However, it fails to activate the tabs I click on.
This is what it generates:
IE ie = new IE("http://localhost:2138/WebClient/Content/TemplateManager.aspx");
ie.Span(Find.ByCustom("innertext","Spatial Settings")).Click();
ie.Span(Find.ByCustom("innertext","Color Settings")).Click();
where Spatial Settings and Color Setings are two of my tabs. Presumably there is an alternative method call I can use to make this work? Or is WatiN not compatible with the Control Toolkit?
|
|
|
|
|
I want to show different URL in browser
which is not a original.
how can I do using glabal.asax
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Can you please explain a little more about what it is you are trying to achieve.
Thanx...
Clean code is the key to happiness.
|
|
|
|
|
I think ur question is not fully describes what exactly it wants?
So please can u give some more info for what u want to achieve.
Believe Yourself™ :->™
|
|
|
|
|
Can anyone send me the code or link how to Store and retrieve images from Sql server 2000. I'm using Asp.net 2.0 as front end.?? Plse help me...
|
|
|
|
|
None can help you for such easily available thing
Could you show attempts/efforts you put for doing this ?
Just Google the subject you will find n number of examples
Remember Google is you best friend
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
You Won't get the Code here, Cause it is not going to be an Exact thing that u want.
Just try urself and go for some references.
You can get Guideline and the way how to achieve it.
Believe Yourself™ :->™
|
|
|
|
|
Hi,
I have a very strange problem.
The navigateURL is changing on browser.
So, when I debug the value of url i.e. is: E:\Documents\www.txt
but in the browser it shows me: file:///E:/Documents/www.txt
as you noticed, it changes my backslashes and becouse of that the url is not working.
Does anybody know why? and how can I change it?
my code is here:
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)<br />
{<br />
TreeView1.Nodes[0].Value = @"E:\asem\Visual Studio 2005\WebSites\SDP\users\" + Membership.GetUser().UserName.ToString();<br />
addsubdir(TreeView1.SelectedNode.Value);<br />
<br />
}<br />
<br />
void addsubdir(string path)<br />
{<br />
<br />
DirectoryInfo dr = new DirectoryInfo(path); <br />
if (dr.Exists)<br />
{<br />
<br />
foreach (DirectoryInfo d in dr.GetDirectories())<br />
{<br />
<br />
TreeNode t = new TreeNode();<br />
t.Value = d.FullName;<br />
<br />
t.Text = d.Name;<br />
<br />
<br />
<br />
t.NavigateUrl = "";<br />
TreeView1.SelectedNode.ChildNodes.Add(t);<br />
<br />
}<br />
<br />
foreach (FileInfo file in dr.GetFiles())<br />
{<br />
<br />
TreeNode t = new TreeNode();<br />
t.Value = file.FullName;<br />
<br />
t.Text = file.Name;<br />
string url = file.FullName;<br />
t.NavigateUrl = url;
Label1.Text = url;<br />
TreeView1.SelectedNode.ChildNodes.Add(t);<br />
<br />
}<br />
<br />
}<br />
<br />
}
|
|
|
|
|
HI, i am doing webapplicaton using validation controls...
I have 5 textboxes and 1 button in my page. i set validation controls like RequiredFieldValidator and CompareFieldValidator.
When i click on button without filling the form, all error messages are displaying at a time.. But i need to display message one by one..
what to do for this?
Thank you
G. Satish
|
|
|
|
|
You probably need to write your own validation controls in javascript, so they work the way you want.
I think it's a pain, I prefer a site to tell me all my issues, not one by one.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
According to my requireemnt, i have to use asp.net validation controls.
I dont want to use normal javascript to display messages..
So, i have only one chance to go with asp.net controls..
Can you suggest the approach how to move..for this..
G. Satish
|
|
|
|
|
But Why you want to show them one by one ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
because...if first textbox is empty, then it shows only Firsttextbox is empty, if it is filled, then it has to show second textbx is empty, not all other textboxes messages...
This is my requirement. i have to go for normal javascript, it is ok
But i have to use this validtaion controls..i.e the problem for me.
can u suggest this, how to approach for this requirement
G. Satish
|
|
|
|
|
Yes there are many approach for this..
Do you want to fire all validations at client side ? (you can do it with javascript)
or is it ok with server side ? then make each validator EnableClientScript to false and at the server side just check each Validator is IsValid or not one by one if first one is Invalid make all other valid
if it is Valid then check for next Validator
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|