|
try this......
dim x as integer
dim cmd as SqlCommand
..........
your code for insert......
..........
x=cmd.ExecuteNonQuery();
if(x>0)
MsgBox("Record inserted", MsgBoxStyle.OkOnly, "Your title")
end if
by the way r u from MAIT
modified on Monday, February 18, 2008 4:03 AM
|
|
|
|
|
This is the ASP.NET forum. That won't work, because the msgbox ( apart from being a VB6 hack that you should not use ) appears on the server, not the client. This code will kill a website, the page will hang and the server won't be able to process any other requests.
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 )
|
|
|
|
|
sumit7034 wrote: MsgBox("Record inserted", MsgBoxStyle.OkOnly, "Your title")
Is not supported in Web world (ASP.NET, actually IIS). DO NOT recommend others to use it.
|
|
|
|
|
That will give you a nice server side message box.
|
|
|
|
|
To expand on Navaneeth's (correct) answer, you need to save the data and then you'll need to post back to the same page, and insert script so when the page reloads, it shows a message box with alert("your data saved"), or whatever. But, if you're doing a postback, you may as well just write it on the page, instead of the nastiness of a message box. If you use AJAX, then you can wait for the response and use javascript to show the message box after the AJAX call has saved the data.
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 )
|
|
|
|
|
Hello Everyone,
I am developing a website and one of webpage generate the following 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."
I already disabled my page Viewstate, and ViewstateMAC for faster page rendering.
Hope you'll give me some suggestions.
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Turn off the viewstate validation, it's a property in the page attribute at the top of the page.
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 )
|
|
|
|
|
Hi Everyone,
I got the answer and I post it here for the help of other programmer....
<pages enableEventValidation="false" viewStateEncryptionMode ="Never" />
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Hi using Reprot Viewer I show some datas in chart way,
In that i like to show the width of the ratio my own style,
How to do that,
Plz help me,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
hi
i wanna create a dynamic form builder using ASP.net, will be better if using metadata Tables "large tables".....
plz if there any one can help me and give me any hints or articles..... these forms will be used to enter data to the data base.....
with regards
Muhannad
|
|
|
|
|
For example
<add key="constr" value="user id=Parthi;data Source=TEST;password=user">
parthiban
|
|
|
|
|
What do you want to do ?
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 )
|
|
|
|
|
Dear Programmers,
I am using gridview in my project. I want to give users a facility so that they can move the rows of the gridview Up and Down. For Example If the press the Up Button on second row of the gridview then the data on Second Row will be shifted on First Row and the Data on First Row must be shifted on Second Row.
For this I have used Link Buttons and I am using VB.NET as language. Please Help me in this regard.
Thankyou.
Waiting for your reply. Please reply me as soon as possible.
|
|
|
|
|
You need to re-order the datasource and re-bind it to grid view.
|
|
|
|
|
You have to use DataTable to re-structure the rows, and again bind the formatted rows with GridView.
I have done the same in C#.Net. If needed you can modify it to VB.Net
Cheers,
Muthu.G
|
|
|
|
|
Hai All,
THE PROBLEM THAT I FACE
Iam copying the contents of a word file(.doc) into a Ritch Text Editor and then by saving, the contents is been writing into a HTML file named Msgbody.html in the admin side.In the user side the html file is been reading into
a dynamic page.The problem here iam facing is that my design is cracking because the actual format that i have in the
word file is not preserving when iam writing it into an HTML File.
Anybody can help me in the above issue.
If can give me a snippet of code.
OR
Could you give me an idea of How to create a Dynamic page.My requirement is that a word file should have to be shown in a dynamic page without loosing it's format.
|
|
|
|
|
I can't imagine that a rich text control has all the functionality that word has. Wouldn't it make more sense to control word to open the document and save it as HTML ?
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 )
|
|
|
|
|
georgegarvasis wrote: Could you give me an idea of How to create a Dynamic page.My requirement is that a word file should have to be shown in a dynamic page without loosing it's format.
Do you want to show the word file contents in the page or provide it to the user for download ? If you want to open word files preserving the formatting, there are plenty of articles came when I did google[^] search.
|
|
|
|
|
Hi all,
I have created inherited HyperLinkUser control as follows
Public Class ResourceHyperLink
Inherits HyperLink
Private m_ResourceID As Integer
Private m_ResouceName As String
Public Property ResourceName() As String
Get
ResourceName = m_ResouceName
End Get
Set(ByVal Value As String)
m_ResouceName = ResourceName
End Set
End Property
Public Property ResourceID() As String
Get
ResourceID = m_ResourceID
End Get
Set(ByVal Value As String)
m_ResourceID = ResourceID
End Set
End Property
End Class
Can I able to add this control in the datagrid Itemtemplate
<asp:TemplateColumn>
<ItemTemplate>
'HERE </ItemTemplate>
</asp:TemplateColumn>
|
|
|
|
|
danasegaranea wrote: Can I able to add this control in the datagrid Itemtemplate
Yes you can do that. What's the problem you are facing here ?
|
|
|
|
|
Thanks for the post Navaneeth,
I tried like this
<asp:TemplateColumn>
<ItemTemplate>
<asp:ResourceHyperLink ID="lblResource_First" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ResourcesName_Left") %>' BorderColor="white" >
</asp:ResourceHyperLink>
</ItemTemplate>
</asp:TemplateColumn>
And got the error as
The active schema doesnot support
|
|
|
|
|
Have you tried putting a simple text value ? Remove DataBinder.Eval(Container.DataItem, "ResourcesName_Left") and put a simple text there. Just check if it is working ?
|
|
|
|
|
I tried like this
<ItemTemplate>
<asp:ResourceHyperLink ID="lblResource_First" Runat="server" Text='My' BorderColor="white" >
</asp:ResourceHyperLink>
</ItemTemplate>
<asp:TemplateColumn>
and got the error as
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type System.Web.UI.WebControls.ResourceHyperLink from assembly System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
Source Error:
Line 322: <asp:TemplateColumn>
Line 323: <ItemTemplate>
Line 324: <asp:ResourceHyperLink ID="lblResource_First" Runat="server" Text='My' BorderColor="white" >
Line 325: </asp:ResourceHyperLink>
Line 326: </ItemTemplate>
|
|
|
|
|
It looks like you haven't registered your control assembly. So default ASP.NET will look in System.Web.UI.WebControls and throws this error. Add the below tag to top of your page.
<%@ Register Assembly="AssemblyName" Namespace="YourNameSpace" TagPrefix="cc1" %> In your sample, call this like
<cc1:ResourceHyperLink ID="lblResource_First" Runat="server" Text='My' BorderColor="white" > </cc1:ResourceHyperLink>
|
|
|
|
|
Hi, i am developing a search engine.when i type a keyword in text box,the matched word should be highlighted and all the results should be appeared.
sending sample code would be appreciable.
Thanks n regards
Krishna PRASAD.
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|