|
I have a master page with 2 divs a LeftColumn and MainColumn. My menu control is in the LeftColumn, the static menu is the same size as the left column so my dynamic menu pops out over the main column. My problem is when the dynamic menu pops out it is behind the content in my MainColumn. How can I get this to come out in front? I know the answer is right in front of me but I seem to be missing it. Any help would be most appreciated.
|
|
|
|
|
set z-index to a higher value so it will be visible
|
|
|
|
|
Hi guys,
You may have seen Ajax Textboxwatermarket effect. I am using that but the problem with this is anytime I try to enter anything on the textfield or textbox the width of the textbox gets slightly bigger, it doesn't stay what i have explicitly defin while coding my textbox. I even set the width in the CSS but still no result.
You may also see live on www.asp.net website and check this control. I would appreciate if anyone can help.
Thanks
|
|
|
|
|
while using java script popups to give a confirmation alert the background screen is getting blank how to achieve this popup without effecting the background screen
entry level s/w professional
|
|
|
|
|
I have a dropdown list.
It has following items
admin@sam.ca.gov Admin Miller
bobby@sam.ca.gov Bobby Gill
chris@sam.ca.gov chris Ghai
jim@sam.ca.gov Jim Ghotra
Here each item represent email address and his first name and last name. I need to select an item from drop down list and grab only email ID when I click on a button.
The domain of email is always same. i.e @sam.ca.gov is always same for all users.
Thanks in advance
seema
|
|
|
|
|
you can use a new string to copy the dropdown list item value/text and then u can use string operations to get the email id use the empty space as the escape sequence to get the string(i.e. email id)
entry level s/w professional
|
|
|
|
|
could you please send me the code
seema
|
|
|
|
|
Hi you can set value property of the dropdownlist to the first name or last name whatever you want.
like
dropdownlist1.Text="admin@sam.ca.gov Admin Miller";
dropdownlist1.Value="Admin Miller";
Naresh Patel
|
|
|
|
|
Hi there,
I'm trying to create bar-graphs that track a students progress a series of tests. Nothing fancy, just bar graphs for 5 different subjects. Y-Axis to contain marks and X-axis date on which the tests were taken. The results will be stored on an SQL database.They may/may not post a link to the graphs on their blog so that when the page loads, the graph should show up.
Any idea which product can do this for me? I had a look at Dundas and .netcharting but both have far more features than i need. Not to mention they waaaay too expensive I just want to display the graph subject wise or all subjects on the page a la Google analytics.
Any suggestions?
|
|
|
|
|
Hello Everyone,
I'm sending mail through ASP.NET and it's rocking. But whenever i'm trying to send the text given below then an error is occuring.
"Some formatted text like bold italic and etc"
Actually i'm creating my own emailEditor through which i can bold,italic and etc. facilities being provided.
And it's working great but as i'm sending normal text it's but as i provide some formatted text it's not..................
The code i'm giving below for sending mail.........
//For Sending The Mail
MailMessage mail1=new MailMessage();
mail1.To="mail@saamstesting.com";
//mail1.From="info@kiritbhaiji.com";
mail1.From="manoj.manojbisht@gmail.com";
mail1.Subject="Mail From Manoj Bisht";
mail1.Priority=MailPriority.High;
mail1.BodyFormat=MailFormat.Html;
string body=HtmlTextArea.Value;
mail1.Body=body.ToString();
try
{
SmtpMail.SmtpServer="127.0.0.1";
SmtpMail.Send(mail1);
lblMsg.Text="Mail Sent Successfully";
lblMsg.ForeColor=Color.DarkBlue;
}
catch(Exception ex)
{
lblMsg.Text=ex.Message.ToString();
lblMsg.ForeColor=Color.Red;
}
And the following error occuring
A potentially dangerous Request.Form value was detected from the client (HtmlTextArea="Manoj Bis...").
-- modified at 11:49 Tuesday 11th September, 2007
|
|
|
|
|
I think you need to turn the event validation on the form off.
I didn't get any requirements for the signature
|
|
|
|
|
Hi Guru's
Im using ObjectDataSource for filling up the GridView, I'm just moving in on using objectDataSource, I find it handy since it trims up my code. After placing the requirement I'm encountering this issue No parameterless constructor defined for this object.
Please let me know what when wrong?
Regards
Dom
|
|
|
|
|
The class doesn't have a zero parameter constructor. Some object that you are using requires a zero parameter constructor (even if it doesn't use it).
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Here's the deal. Any serializable object must have a parameterless constuctor. For the Object Oriented beginner that means.
Class MyDataOject
{
public MyDataOject()
{
//parameterless consturctor
}
}
This is so that the object can be serialized to XML. Also you can not not have read only properties for the same reason. If a property is read only you can't recreate the object from xml. The objectDataSource probably serializes your class behind the scenes.
I didn't get any requirements for the signature
|
|
|
|
|
Hmm basically I doing a layman work which is trying to convert my DAL (data access layer) functions to objectDataSource properties, the function I'm calling accepts one argument which sometimes can be null / 0 since its optional. Below is my function as well as the DAL that it calls
Public Function fill(Optional ByVal orderID As Integer = 0) As DataTable<br />
Dim cmd As SqlCommand<br />
cmd = New SqlCommand<br />
Dim da As SqlDataAdapter<br />
da = New SqlDataAdapter<br />
Dim dt As DataTable<br />
<br />
Try<br />
dt = New DataTable<br />
cmd.Connection = _SQLConnection<br />
cmd.CommandType = CommandType.StoredProcedure<br />
cmd.CommandText = "nw_spSelectOrders"<br />
cmd.Transaction = _SQLTransaction<br />
<br />
If Not orderID.Equals(0) Then<br />
<br />
cmd.Parameters.Add(New SqlParameter("@orderID", SqlDbType.Int))<br />
cmd.Parameters("@orderID").Direction = ParameterDirection.Input<br />
cmd.Parameters("@orderID").Value = orderID<br />
End If<br />
<br />
da.SelectCommand = cmd<br />
da.Fill(dt)<br />
<br />
If Not dt.Rows.Count > 0 Then<br />
Throw New Exception("no record")<br />
<br />
Else<br />
Return dt<br />
<br />
End If<br />
<br />
Catch ex As Exception<br />
Throw New Exception(ex.Message)<br />
<br />
Finally<br />
cmd.Dispose()<br />
da.Dispose()<br />
<br />
End Try<br />
<br />
End Function
SP for the function above:
0 - returns all data
SET ANSI_NULLS ON<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
<br />
alter PROCEDURE nw_spSelectOrders <br />
(<br />
@orderID int = 0<br />
<br />
)<br />
as<br />
begin<br />
<br />
Select o.orderID, <br />
od.quantity, <br />
od.unitprice, <br />
od.unitprice <br />
from orders as o<br />
left outer join [order details] as od<br />
on o.orderid = od.orderid<br />
where case when @orderID = 0 then 'selected'<br />
else<br />
case when o.orderID = @orderID then 'selected'<br />
else 'not selected'<br />
end <br />
end= 'selected'<br />
end
Whats wrong with passing 0? when I explicitly place orderID number I get result but passing 0 nada..
Please advice
Thanks Guys
-- modified at 20:49 Tuesday 11th September, 2007
|
|
|
|
|
Uhh please advise what? The error is REALLY descriptive, and two people here have given you the answer.
I advise you learn .NET or something, if you can't even figure out what a paremeterless constructor is.
|
|
|
|
|
I don't mean to be harsh all of us do start from baby step, those two people has given helpful suggestions and you.. you simply throw snow ball and say I advise you learn .NET or something ... or something?? WAD!
Big help anyways
|
|
|
|
|
I am using RegisterStartupScript to run a javascript and display a modal web form from my code behind page. In vb.net the code is:
strScript = "<script> OpenWebPrompt('The party size and quantitative/qualitative answers require that this request be cancelled. Please speak to a client id for further guidance.','www.cnn.com','Reset','Abort','','');</script>"
Page.RegisterStartupScript("OpenWebPrompt", strScript) where OpenWebPrompt is a javascript in this page.
When the form is displayed all looks OK, but a button is clicked, another instance of the form is displayed and only then is the vbscript of the web form called. I am a new web programmer so i apologize if this is a simple question.
The javascript is:
function OpenWebPrompt(msg, hlink, btn1, btn2, btn3, btn4)
{
var sOptions;
sOptions = "center: Yes; dialogHeight: 550px; dialogWidth: 720px;";
var oArgs = new Object();
oArgs.msg = msg;
oArgs.hlink = hlink;
oArgs.btn1 = btn1;
oArgs.btn2 = btn2;
oArgs.btn3 = btn3;
oArgs.btn4 = btn4;
var url = "../convertedcontrols/webprompt.aspx?msg=" + msg + "&btn1=" + btn1 + "&btn2=" + btn2 + "&btn3=" + btn3 + "&btn4=" + btn4 + "&hlink=" + hlink;
var w = window.showModalDialog(url,"",sOptions);
var objVal = document.getElementById("<%=Me.UniqueID%>_txtPromptReturn");
objVal.text = w
//document.forms(0).submit();
// return w;
}
The webform is:
<%@ AutoEventWireup="false" Codebehind="WebPrompt.aspx.vb" Inherits="CSFB.WebPrompt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<script runat="server">
sub btnClick(sender as object, e as system.eventargs)
ctype(sender,button).Text = ctype(sender,button).id & " clicked"
end sub
</script>
<title>WebPrompt</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 56px; POSITION: absolute; TOP: 152px" runat="server"
OnClick="btnClick" Text="Button" Visible="False"></asp:Button>
<asp:Button id="Button4" style="Z-INDEX: 104; LEFT: 280px; POSITION: absolute; TOP: 152px" runat="server"
OnClick="btnClick" Text="Button" Visible="False"></asp:Button>
<asp:Button id="Button3" style="Z-INDEX: 103; LEFT: 200px; POSITION: absolute; TOP: 152px" runat="server"
OnClick="btnClick" Text="Button" Visible="False"></asp:Button>
<asp:Button id="Button2" style="Z-INDEX: 102; LEFT: 128px; POSITION: absolute; TOP: 152px" runat="server"
OnClick="btnClick" Text="Button" Visible="False"></asp:Button>
<asp:Label id="lblMsg" style="Z-INDEX: 105; LEFT: 56px; POSITION: absolute; TOP: 32px" runat="server"
Width="288px" Height="60px"></asp:Label>
<asp:HyperLink id="hlWebLink" style="Z-INDEX: 106; LEFT: 56px; POSITION: absolute; TOP: 104px"
runat="server" Width="384px" Height="16px" Visible="False"></asp:HyperLink>
</form>
</body>
</HTML>
Thanks,
Tim
|
|
|
|
|
RegisterStartupScript will register your javascript and will call when form gets loaded. i think you are also calling same function on button click event . What you have to do ?
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... "
|
|
|
|
|
Hi all,
i have a page with a button on it, onclick of button i need to get a string data from database and need to write that to a word file. my code is like this:-
1) function:- i am calling this function on button click event after getting my data from database, suppose data is a string "someString".
i am bound to use this approach only because of some specific requirements(can't use word file writing with word application and document object...)
private void html2word(string someString)
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.ContentType = "application/msword";
HttpContext.Current.Response.Write(@"");
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename='InvDetails.doc'");
HttpContext.Current.Response.Charset = "utf-8"; //UTF8
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("windows-1250"); //windows-1250
HttpContext.Current.Response.Write("");
HttpContext.Current.Response.Write(someString); HttpContext.Current.Response.Write(" ");
return HttpContext.Current.Response;
// this flush() line of code will ask user to open or save a word file, here only i want to save this file without prompting the user, as this file is going to be deleted after some operation and hence user should not know that it is created... how can we do this
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
}
People often say that motivation doesn't last. Well, neither does bathing - that's why we recommend it daily
Akhilesh Singh
|
|
|
|
|
Hi All,
Is there any relationship between Cookies and Session.Abandon()???
Is am implementing Remember Me on this computer on login page and store the user name and password in Cookies. It works fine if I logout from my site but if I close my application and again run then it doesnot maintain the cookie values.
Please help me...
Thanks in advance...
|
|
|
|
|
Hey sorry for late reply
Can you post the code where you are adding cookie from server side
see this it is working fine in my machine sequence should be like this only specially for expiry i think it should work now
<br />
HttpCookie cookie = new HttpCookie(TxtBxUserName.Text);<br />
Response.Cookies.Add(cookie);<br />
cookie.Values.Add("",TxtBxUserName.Text + "|" + TxtBxPassword.Text + ";");<br />
Response.Cookies[TxtBxUserName.Text].Expires = DateTime.Now.AddDays(15); <br />
<br />
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... "
|
|
|
|
|
Hey Sandeep, many many thanks. Its working fine now. Thanks a lot.
|
|
|
|
|
im sorry...but i dont have much experience in this...
but i think u have to use Sesseion.Clear();
coz the Session.Abandon(); will delete the key of ur web.
regards and replay if it is worked
|
|
|
|
|
Hi,
Please can someone give me help with how i go about creating a (pop-up) confirmation box which is activated on page load. If the client clicks 'ok' i need to redirect them to another page, otherwise they are to stay on the current page.
Thanks in advance.
|
|
|
|