|
ASP.Net is a server side code and u wanted to show any message to end user on web based application then u go with javascript alert method or try to have new web page just for showing messages alone.
|
|
|
|
|
Hi,
You can use any one of the Following Syntax in Code Behind.
string Msg = "Hai";
string jv = "alert('" + (Msg) + "');";
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "alert", jv, false);
(or)
Page.RegisterStartupScript("Error", "alert('Hai')");
bye
|
|
|
|
|
See this
http://vuyiswamaseko.blogspot.com/2009/04/how-to-show-mesage-box-in-aspnet.html[^]
Hope it Helps
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.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Vuyiswa,
I saw your post. its cool. Will it work if we have ScriptManager in that page?
In that case you have to use ScriptManager insted of ClientScript. You may add this section also on that post.
Thanks !
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Yes it will work. Will add it
Thanks !
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.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Good Morning All
I have a Menu Control
<asp:menu id="Menu2" runat="server" backcolor="AliceBlue" bordercolor="SteelBlue" xmlns:asp="#unknown">
BorderStyle="Solid" BorderWidth="1px" DynamicHorizontalOffset="2" Font-Names="Verdana"
Font-Size="8pt" ForeColor="Black" Height="20px" OnMenuItemClick="menureplace_MenuItemClick"
StaticSubMenuIndent="10px" Width="87px">
< dynamichoverstyle backcolor="#7C6F57" forecolor="White" />
< dynamicmenustyle backcolor="White" bordercolor="Black" borderstyle="Solid" borderwidth="1px" />
< staticselectedstyle backcolor="#5D7B9D" />
< dynamicselectedstyle backcolor="#5D7B9D" />
< dynamicmenuitemstyle font-names="Verdana" font-size="10pt" forecolor="#C00000" horizontalpadding="5px">
VerticalPadding="2px" />
< items>
< asp:menuitem text="Replace selected" value="Replace selected">
<asp:menuitem text="Confirm Replace" value="Replace Selected"></asp:menuitem>
< /asp:menuitem>
< /items>
< statichoverstyle backcolor="#7C6F57" forecolor="White" />
< /dynamicmenuitemstyle></asp:menu>
And This Menu Control works Fine outside the View Control. How can i make it work inside the View Control ?
Thank you
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.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
Am having textbox in Gridview.I need to set the focus(i.e. the cursor should place inside textbox) when add link button is clicked. For this i have used java scipt.
function Click_Enter(CID,event)
{
var key;
key=(event.which) ? event.which : event.keyCode;
if(key==13)
{
document.getElementById(CID).focus();
}
return true;
}
And in code behind of link button click event
ImageButton ibtnSave = (ImageButton)gvBillingType.FooterRow.FindControl("ibtnSave");
TextBox txtAddcontrol = (TextBox)gvBillingType.FooterRow.FindControl("txtFooterBillingType");
Page.RegisterStartupScript("SetFocus", "document.getElementById('" + txtAddcontrol.ClientID + "').focus();");
txtAddcontrol.Attributes.Add("onkeydown", "javascript : return Click_Enter('" + ibtnSave.ClientID + "',event);");
this code is Wkg in Mozila.. but in IE it is not WKG.. Pls anyone help me fast.
|
|
|
|
|
Hai,
I don't know about it.
|
|
|
|
|
I don't think problem with browser but ur code checks KeyCode and which won't work if u use mouse to click.
|
|
|
|
|
Then what is the solution for this problem.. I have tried hardly for this.. The cursor alone is not placing inside textbox.. But all the other work like after entering any text and press enter it is getting save in gridview... This problem is occuring only in IE
|
|
|
|
|
txtAddcontrol.Attributes.Add("onkeypress", "javascript : return Click_Enter('" + ibtnSave.ClientID + "',event);");
try this...Hope it should be KeyPress event....
CodingRocks
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Hi...
I tried but it is not wkg
|
|
|
|
|
when there is a data like this
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
then the width of the grid is moving large how can i solve this problem
|
|
|
|
|
This is a very funny scenerio. What data exactly are you going to show? Is there any word in your data which contains more than 30 words like Pseudopseudohypoparathyroidism? If it is the case then I would suggest you to truncate letters and show it on a tooltip. Sometimes, software testers are used to test like this (what you have mentioned) when they don't find any bug.
Either you love IT or leave IT...
|
|
|
|
|
|
Anjani Poornima wrote: same in server it's not working.......
The issue is that you know nothing about internet development. Where does your code run ? On the server ? So, where will notepad open ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hey.. You are opening notepad of the server ... not the client.
|
|
|
|
|
Gee - thanks for adding that.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
And after all this, he just deleted the original message ...
|
|
|
|
|
How to get the values from database for checkboxlist in the datalist?
I have tried something but it display only final record? I want to display all items of particular record? How can I do? plz help me
|
|
|
|
|
Perhaps if you posted an example of the data and the code, so we can understand what you mean ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Public Function PopulateList() As DataSet
Dim cmd As New SqlCommand("select qt.department as dept, qt.custid as cusid, q.qotranid as qotranid,q.qoid as qoid,q.productid as proid,q.productname as pname,q.description as descr,q.qnty as qnty,q.price as price,q.tax as tax,q.total as total from quotation q ,quotetran qt where q.qotranid='" & ddlqo.SelectedItem.Text & "' and qt.qotranid='" & ddlqo.SelectedItem.Text & "' ", myConnection6)
myConnection6.Open()
Dim myDataReader As SqlDataReader
myDataReader = cmd.ExecuteReader()
While (myDataReader.Read()) = True
pid = myDataReader("proid")
Dim ad As New SqlDataAdapter("SELECT q.productid,s.productid,s.serialno as serialno from stockserialno s,quotation q where q.qotranid='" & Trim(ddlqo.SelectedItem.Text) & "' and q.productid=s.productid and s.status='A' and s.productid='" & productid1.Text & "' ", myConnection3)
ad.Fill(ds1, "stockserialno")
Return ds1
End While
myDataReader.Close()
myConnection6.Close()
End Function
|
|
|
|
|
indian22 wrote: Return ds1
Well, what do you think this will do ? Duh. You return, and the function ends.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I have tried but it display all the items in every row,but I need to display only those items that coresponding to paricular row
|
|
|
|
|
Hi,
I am trying to encrypt the url by using httputility class,
dim url as string
url=Server.UrlEncode("aspxFirst.aspx") the url is encrypted,
response.redirect(url) then am getting error Resource not found, If any one knows plz respond me...
kannak
|
|
|
|