|
sir will u plz tell where this is to implement and what is strpos
|
|
|
|
|
|
hi friends
I want to call .jsp files functions from asp.net
how can I do this
I need to create HessianProxyFactory for that
does any one knows how to do this
Thanking you,
Laxmikant
|
|
|
|
|
If the files reside on the same server or domain then yes.
Otherwise, you will not be able to do so.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
I've Two pages,One is HTML and Other One is ASPX page..When I'm Clicking Button on html Page it Redirect to aspx page..Here is the prblm..I want to see the HTML Page name in aspx page???
How Can I???
|
|
|
|
|
You would need to pass it on the URL
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 )
|
|
|
|
|
Vanamaindia wrote: How Can I???
You can get it by
string preURL=Request.UrlReferrer.ToString();
Best regard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
i'm used Like This Response.Write(PreviousPage.ClientID)
But gives Object reference Notset bla bla...
|
|
|
|
|
Vanamaindia wrote: 'm used Like This Response.Write(PreviousPage.ClientID)
What do you want to get?
If you want previous page URL, use my first post code
please don't forget to vote on the post that helped you.
|
|
|
|
|
string preURL=Request.UrlReferrer.ToString();
It Gives Error Like Object reference not set to an instance of an object.
|
|
|
|
|
Try this.
HTML File
=========
<title>Untitled Page
Page_Load event of Default.aspx
===============================
Response.Write (Request.UrlReferrer.ToString ());
|
|
|
|
|
Vanamaindia wrote: string preURL=Request.UrlReferrer.ToString();
It Gives Error Like Object reference not set to an instance of an object.
You should check the Referrer is null before continuing. Pages that don't have referrer will throw this error. Do a null check before you access ToString()
|
|
|
|
|
Hi,
try this..
string url = Request.ServerVariables["HTTP_REFERER"];<br />
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
|
|
plz repeat the question clearly
|
|
|
|
|
It is Clear.....I can Search in Google..
|
|
|
|
|
hai,
my req is i need to add items from database into dropdownlist my code follows this way:
form id="form1" runat="server">
<asp:detailsview id="DetailsViewEnquiryEdit" runat="server" autogeneraterows="False"
="" datasourceid="ObjectDataSource1" height="50px" width="188px">
<fields>
<asp:boundfield datafield="EnquiryId" headertext="EnquiryId" sortexpression="EnquiryId">
<asp:boundfield datafield="EnquiryName" headertext="EnquiryName" sortexpression="EnquiryName">
<asp:boundfield datafield="EnquiryStatus" headertext="EnquiryStatus" sortexpression="EnquiryStatus">
<asp:boundfield datafield="EnquiryDesc" headertext="EnquiryDesc" sortexpression="EnquiryDesc">
<asp:boundfield datafield="SourceId" headertext="SourceId" sortexpression="SourceId">
<asp:boundfield datafield="CustomerId" headertext="CustomerId" sortexpression="CustomerId">
<asp:boundfield datafield="ServiceId" headertext="ServiceId" sortexpression="ServiceId">
<asp:boundfield datafield="CountryId" headertext="CountryId" sortexpression="CountryId">
<asp:templatefield headertext="CountryName">
<edititemtemplate>
<asp:dropdownlist id="DropDownList1" runat="server" datasourceid="SqlDataSource1"
="" datatextfield="CountryName" datavaluefield="CountryName" selectedvalue="<%# Bind("CountryName") %>">
<asp:sqldatasource id="SqlDataSource2" runat="server" connectionstring="<%$ ConnectionStrings:System.Data.SqlClient %>"
="" selectcommand="SELECT [CountryName] FROM [tb_country]">
<itemtemplate>
<asp:label id="Label1" runat="server" text="<%# Bind("CountryName") %>">
<footertemplate>
<asp:button id="Button1" runat="server" text="Save" onclick="Button1_Click">
<asp:button id="Button2" runat="server" text="Cancel" onclick="Button2_Click">
.
<asp:objectdatasource id="ObjectDataSource1" runat="server" oldvaluesparameterformatstring="original_{0}"
="" selectmethod="GetEnquiry" typename="gfinFacade.EnquiryFacade">
<selectparameters>
<asp:sessionparameter name="enqId" sessionfield="enqId" type="Int32">
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$ ConnectionStrings:gfinConnectionString %>"
="" selectcommand="SELECT [CountryName] FROM [tb_Country]">
but i am getting error like
'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
can anybodu tell how to solve this
padma
|
|
|
|
|
Hi,
check the items in the datasource before you execute,
it must have changed i believe
|
|
|
|
|
hai,
my req is i need to add items from database into dropdownlist my code follows this way:
form id="form1" runat="server">
<asp:detailsview id="DetailsViewEnquiryEdit" runat="server" autogeneraterows="False"
="" datasourceid="ObjectDataSource1" height="50px" width="188px">
<fields>
<asp:boundfield datafield="EnquiryId" headertext="EnquiryId" sortexpression="EnquiryId">
<asp:boundfield datafield="EnquiryName" headertext="EnquiryName" sortexpression="EnquiryName">
<asp:boundfield datafield="EnquiryStatus" headertext="EnquiryStatus" sortexpression="EnquiryStatus">
<asp:boundfield datafield="EnquiryDesc" headertext="EnquiryDesc" sortexpression="EnquiryDesc">
<asp:boundfield datafield="SourceId" headertext="SourceId" sortexpression="SourceId">
<asp:boundfield datafield="CustomerId" headertext="CustomerId" sortexpression="CustomerId">
<asp:boundfield datafield="ServiceId" headertext="ServiceId" sortexpression="ServiceId">
<asp:boundfield datafield="CountryId" headertext="CountryId" sortexpression="CountryId">
<asp:templatefield headertext="CountryName">
<edititemtemplate>
<asp:dropdownlist id="DropDownList1" runat="server" datasourceid="SqlDataSource1"
="" datatextfield="CountryName" datavaluefield="CountryName" selectedvalue="<%# Bind("CountryName") %>">
<asp:sqldatasource id="SqlDataSource2" runat="server" connectionstring="<%$ ConnectionStrings:System.Data.SqlClient %>"
="" selectcommand="SELECT [CountryName] FROM [tb_country]">
<itemtemplate>
<asp:label id="Label1" runat="server" text="<%# Bind("CountryName") %>">
<footertemplate>
<asp:button id="Button1" runat="server" text="Save" onclick="Button1_Click">
<asp:button id="Button2" runat="server" text="Cancel" onclick="Button2_Click">
.
<asp:objectdatasource id="ObjectDataSource1" runat="server" oldvaluesparameterformatstring="original_{0}"
="" selectmethod="GetEnquiry" typename="gfinFacade.EnquiryFacade">
<selectparameters>
<asp:sessionparameter name="enqId" sessionfield="enqId" type="Int32">
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$ ConnectionStrings:gfinConnectionString %>"
="" selectcommand="SELECT [CountryName] FROM [tb_Country]">
but i am getting error like
'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
can anybodu tell how to solve this
padma
|
|
|
|
|
hi all
gud morning.can anyone tell me how to export a crystal report to pdf format through c# coding(programatically)
pintoo
|
|
|
|
|
Dim oStream As New System.IO.MemoryStream
oStream = crEnquiryReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Response.BinaryWrite(oStream.ToArray())
Response.End()
|
|
|
|
|
If we have a database where we can store all the users list.If any of them are in online we want to conference chat with all the online users.Is any code available for this conference.I attach one code with this mail .In that code we can chat with one -to-one users as in gmail or rediff web application.But if i want to chat with more than one users like conference chat in yahoo messenger,what changes i need.if i specify the window name by any string not with users name specifing by a variable,the conference is possible.Please help sir .I want to implement this in my project.Early u people send some links to me ,but all are using dlls so i cant integrate it in my pjct.Kindly help....The code is attached below.
//Code to send msg to the online user
protected void BtnSend_Click(object sender, EventArgs e)
{
string toUserName;
string chatMsg;
DateTime chatDate;
string fromUserName;
try
{
fromUserName = User.Identity.Name;
toUserName = HidToUser.Value;
MembershipUser objMemberTo = Membership.GetUser(toUserName);
if (objMemberTo.IsOnline == false)
{
lblMsg.Visible = true;
lblMsg.Text = toUserName + "is Offline now. ";
}
chatMsg = ChatText.Text;
chatDate = System.DateTime.Now.ToLocalTime();
string fromUserID, toUserID;
MembershipUser objMemberFrom = Membership.GetUser(fromUserName);
fromUserID = objMemberFrom.ProviderUserKey.ToString();
//MembershipUser objMemberTo = Membership.GetUser(toUserName);
toUserID = objMemberTo.ProviderUserKey.ToString();
if (!string.IsNullOrEmpty(ChatText.Text))
{
if (ChatText.MaxLength <= 4000)
{
db_chat.InsertChatMessage(fromUserID, toUserID, chatMsg, chatDate, false);
}
}
DisplayChatMessage();
Label1.Text = "tony";
lblMsg.Text = "hai";
}
finally
{
}
}
protected void DisplayChatMessage()
{
DataTable dtChatMsg;
string fromUser;
string toUser;
string toUid, fromUid;
fromUser = User.Identity.Name;
toUser = HidToUser.Value;
MembershipUser objMemberTo = Membership.GetUser(toUser);
toUid = objMemberTo.ProviderUserKey.ToString();
MembershipUser objMemberFrom = Membership.GetUser(fromUser);
fromUid = objMemberFrom.ProviderUserKey.ToString();
DateTime loginTime = new DateTime();
loginTime = objMemberFrom.LastLoginDate;
dtChatMsg = db_chat.GetChatMessage(toUid, fromUid, loginTime);
DataColumn dc = new DataColumn("UserName");
dc.DataType = System.Type.GetType("System.String");
dtChatMsg.Columns.Add(dc);
if (dtChatMsg.Rows.Count > 0)
{
foreach (DataRow dr in dtChatMsg.Rows)
{
if (dr["FromUser"].ToString() == fromUid)
{
dr["UserName"] = "me";
}
else if (dr["FromUser"].ToString() == toUid)
{
dr["UserName"] = toUser;
}
}
Chatlist.DataSource = dtChatMsg;
Chatlist.DataBind();
}
}
}
|
|
|
|
|
I set all my business layer classes as sealed class. I did like this because I read from somewhere that this will improve the performance. Is it true?
Thanks and Regards,
Hogan
|
|
|
|
|
hogan.smith wrote: I read from somewhere that this will improve the performance. Is it true?
I set the class as sealed class when I want to prevent derivation.. That's all. I never heard that the sealed class is better than the normal class..
|
|
|
|