|
I tried but its showing error: "The name 'ScriptManager' does not exist in the current context"
|
|
|
|
|
Everyone is assuming you're writing script inside your page. That you're not, is bad design. You should fix that, catch the exception in your presentation layer, and do it there. I agree, using the script manager is a good idea. It is an object on the page class, so you can access it that way.
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.
|
|
|
|
|
nagendrathecoder wrote: But i solved the above error by writting :
Yeah, that looks like it could work. However, it's bad form for your non presentation layer to be pumping out HTML. You'd do better to catch the exception in the presentation layer and put your code there.
nagendrathecoder wrote: But its not showing Alert Box on exception.
Have you checked the HTML to make sure your javascript is being inserted ?
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.
|
|
|
|
|
ok, now i am passing my exception as a string to presentation layer and trying to show alert box there, but its still not working.
|
|
|
|
|
OK, did you do the other stuff I suggested ? I agree with the person who said to use RegisterClientScriptBlock. Then you need to check to see if the script is being passed into the HTML or not. If it's not there, then that's your issue. if it is, you need to work out why it does not display ( I would have expected it to )
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 am getting this string as my script
string msg ="<script language=JavaScript>alert('Violation of PRIMARY KEY constraint 'PK_BOMDetail'. Cannot insert duplicate key in object 'dbo.BOMDetail'.\r\nThe statement has been terminated.');</script>";
RegisterClientScriptBlock("Hello", msg);
Its still not showing.
|
|
|
|
|
Guess what, its worked.
The single quotes was troubling me.
Thanks for all your help.
|
|
|
|
|
If any row gets changed, deleted, added etc in dataset and we use DataSet.Acceptchanges(), then all the changes committed in dataset. The RowState property of each DataRow also changes; Added and Modified rows become Unchanged, and Deleted rows are removed.
After DataSet.Acceptchanges(), no row is in changed position now. Now after this if we want to transfer the changes to live database, it will not happen because dataset is showing that no changes have taken place in it.
So make sure that you don’t use DataSet.Acceptchanges() if you want to transfer the changes to live database.
So when and why to use Dataset.accpetchanges()
|
|
|
|
|
I have host my web application and when I try to login from form i get this error
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
What is in issue?! Can be .NET Framework version?!
How can I solve this problem?
|
|
|
|
|
Well, you could start by reading the error. Are you in a webfarm ? Are you in a cluster ?
Beyond that, you could try this[^].
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,I figured out.
All problem was at server name in which I should gave IP Address,I have contact support of hosting provider and they sent me answer and my problem is solved.
Thanks for your time.
|
|
|
|
|
Hello
I have a website which I think it has not a good appearance. Please help me. Does anyone know a method to make website beautiful and attractive?
Does anyone know a good and new template for website?
Note that my website is formal and personal.
sincerely
|
|
|
|
|
hasani2007 wrote: Does anyone know a method to make website beautiful and attractive?
You have to use CSS for that.
if you want to make it more Rich, use SilverLight or Flex
hasani2007 wrote: Does anyone know a good and new template for website?
asp.net free website templates[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Apply CSS,
Use Style to each tags, Apply Skin to Server controls etc.
You can also use Templates..
See this
ASP.NET Free Templates[^]
|
|
|
|
|
what is this doing in web.config .. what if i remove this
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
|
|
|
|
|
What do you think it might do ? Why might you do it ?
the word dependant means, that it's something that's required, you depend on 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.
|
|
|
|
|
we bind custom built assemblies .. depending on the version of the framework or the processorarchitecture
these are not custom built assemblies they are system assemblies.. and only these two are binded ... is this not required for other system assemblies???
i have taken this from an auto generated web.config
|
|
|
|
|
The stuff that ASP.NET ALWAYS uses, is there by default. I would guess this is ASP.NET AJAX, or some other library you have added.
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,
I need to save a multiline text into a SQL table. I use the fiedl type is Text.
I found that the multiline mode is not maintained after saving into table, that is to say, all the text become only one line.
thenn when this text is displayed in a view control such as datalist, then it is a very long text line, obviously, not good!
how to treat this problem?
thanks.
|
|
|
|
|
Try to replace the string that your are showing on text box using BR
like,
string strAddress= strAddress.Replace("\r\n", "<BR>");
Hope this may helps you
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
A simple newline puts character 13 on the input. So if you store it in the database it will hold only character 13(\n)
In case you show in DataList, the formatting is done using HTML, so you need <br/> to have new line.
Replace \n\r with <br/> and it will work.
|
|
|
|
|
I am working on a project and need help that how sms are sent and read on a web page developed in ASP.NET.
please reply if know as soon as possible.
tina.
|
|
|
|
|
tina sharma wrote: please reply if know as soon as possible
That is rude.
You can look into this[^] library.
Hope this helps.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
|
how to identify the duplicate records in sql server 2005
|
|
|
|