|
sd1 = "Insert into Producing_Agency(pa_id,pname)values(1,'"&txtname.text&"')
pains = New SqlCommand(sd1, dbconn)
pains.ExecuteNonQuery()
Lbldisplay.Text = "Record Added"
Here i am using Lbldisplay for displaying the message in the same form.
can i disply by using the below in the same form ,
Response.Write(" alert(' Record inserted '); ")
my doubt is Reposne.write means,this message is displying in other page.It directs otherpage.This is my doubt.
kissy
|
|
|
|
|
No, Kissy
response.write meanse writing some text on the same page
as you wrote code i tried the same to my page but i got the message on the same page,
it didn't redirected me any other page.
i think you must check your .aspx page code.
Regards
Ravi
|
|
|
|
|
Use this....enjoy
RegisterClientScriptBlock("Alert", "alert('Purchase Invoice save successfully')");
Dinesh Sharma
Team Leader (Software Development)
|
|
|
|
|
Thanks for ur answer,But both are working same,No change,any way i will use any of them
Thanks once again.
kissy
|
|
|
|
|
Try using a Server side Label
label1.Text = "Textbox Error";
label1.Visible = false;
if(error)
Label1.Visible = true;
keep Learning and you never will be out of date...
|
|
|
|
|
use this:
Page.RegisterStartupScript("MyScript(any script name)", "alert('Message...');"
|
|
|
|
|
|
Bcoz C# gives machine level access
c# have all the vb.net functionality but vb.net doesn't
|
|
|
|
|
The best language for you is the one that you write the best code in. It doesn't matter how good a language is if you can't use it.
When it comes to performance or capabilities, the differences between VB.NET and C# is not that big.
Personally I prefer C# mostly because of the structure of the language, and the strict type checking. VB lets you get away with automatic conversions that really isn't good for you.
For example, this works in VB:
Dim Cnt As String<br />
Cnt = 1<br />
Cnt = Cnt + 1
The result is that the string Cnt now contains "2" as VB automatically converts the value back and forth between strings and integers, so it works more or less as intended. The problem is that the conversions makes the code take about 600 times longer than if you would have used an integer variable instead. Imagine if you use this is a loop...
Of course C# doesn't let you write such garbage.
---
b { font-weight: normal; }
|
|
|
|
|
You also have operators that do one thing, and one thing only:
e.g. in VB.net, this:
<br />
"A string " & " concatenated."
works the same as this:
"A string " + " also concatenated."<br />
Which makes it interesting when you take Guffa's post about implicit conversion of numbers etc...
|
|
|
|
|
Silly answer, but very much true: vb.net is WORDY as he#$. I can easily identify different blocks of code in a c# document thanks to the symbol usage, but not in vb (IF... ENDIF... what's up with that?!?). Also, its syntax is close to c++ and java, so it keeps my skills functional on all those languages. Besides, if you want to be a "marketable" programmer, stick with c#, they get more/better opportunities.
Nila
"...for that, I will need a large cup of coffee and a brand muffin!" -Samantha Bea
|
|
|
|
|
This is an age old debate and there are countless examples of this debate on the internet.
my advice to you, is that both languages use the .NET framework, so
in essence niether are any better than each other. At the end of the day the language choice is that of the developer as to what syntax they prefer.
I personally use both on a daily basis, and don't really care which one I use. It is up to the client as to which one they prefer to support and what skills they have in house to support the application.
|
|
|
|
|
Hi,
I have a datagrid and I also have Edit command by which I
am editing the data present in the datagrid. I have bound
my columns with the help of BoundColumn.
While Update, I want to validate the contents in the
textbox and want to use validators but since there is no
text box control (as asp.net internally generates Text box
by default) which I can specify in validator, how to
validate?
|
|
|
|
|
nabeelkhan wrote:
(as asp.net internally generates Text box by default
Its no magic.
If you look at the HTML source of your .aspx file, you will see a EditItemTemplate where a textbox is defined.
You can add your validator in that template so that it is added to the HTML when user presses Edit button.
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
Hi,
i have textboxces in datagrid control now i want to validate these textboxces through javascript fucntion ,,kindly help me in this above regard
waiting for ur resposes
|
|
|
|
|
u can use validators like Regular expression validator etc in asp.net
|
|
|
|
|
Hi friends !
I tested my aspx page on local host and its perfectly running. I host that page in the Internet,and when I tried to open that aspx page It shows an error message ie Server'\'error......
Even I upload all supporting files such as bin global.aspx web config....etc
please help me friends
demane'
|
|
|
|
|
HI
First check which version of asp.net u r using either asp.net1.1 or asp.net2.0.
check your webserver on internet supports your asp.net version.if its correct everything work fine..
Regards
R.Palanivel
r_palanivel83 10:01 4 Jan '06
|
|
|
|
|
On ur webspace where u are uploadiong the site check that ur hosting service providers have enabled asp.net for ur website or not if not then change ur web hosting settings and enable it
|
|
|
|
|
I have an asp image upload control in my project , and i can't able to upload images more than 4kb size. What i should do to upload images up to 6kb.
Thanks in advance.
Regards
sundarapandian
|
|
|
|
|
I used the FileUpload control and its working with all images sizes
keep Learning and you never will be out of date...
|
|
|
|
|
Thanks for ur reply,
but the size is 4mb not 4kb as i mentioned in previous post.
u cant upload a image more than 4 mb in size.
|
|
|
|
|
Hello all.
I am working on asp.net 2005, the solution is wroking fine in local machine but when I copied pages in web hosting server its giving some exception, i was not ably to see the exact exception because in webserver its send to specific page if found any error.
I removed the line where I was creating object of other class and then copied to web and it works fine.
So is there is any specific way for creating object of other class in aspx 2005.
|
|
|
|
|
Something as simple as creating an object should not cause problems! In order to properly troubleshoot this, you have to see the exception... in your web.config change your custom error tag to the following:
<customerrors mode="RemoteOnly">
You may have other elements/attributes associated with your customErrors, but you should be able to get the idea. Now, you should be able to see the actual exception ONLY when you access the application from the hosting server. Also, check your event viewer to see if asp.net has logged any application errors/warnings.
I got a couple of questions, did you precompile your web project? Did you send over the Website, or the whole solution?
Nila
"...for that, I will need a large cup of coffee and a brand muffin!" -Samantha Bea
|
|
|
|
|
few company use cruise control open source but i want to what is it actually and in which situation i have to use it.
what is the advantage of using cruise control with .net.
tbhattacharjee
|
|
|
|