|
use this
string StrCom = Request.QueryString["CID"];
Label1.Text = StrCom;
its working 100%
Piyush Vardhan Singh
|
|
|
|
|
Piyush Vardhan Singh wrote: Dim StrCom As String
StrCom = CType(Request.QueryString.GetValues("CID")(0), String)
Lable1.text = StrCom
WHY ? Request.QueryString returns a string value. Why you need to cast it again to string ?
|
|
|
|
|
yes u r right. but i use this code in my last project so i paste this code for deep.
Piyush Vardhan Singh
|
|
|
|
|
Error : Method Name Expected Please Correct Code
|
|
|
|
|
use this
string StrCom = Request.QueryString["CID"];
Label1.Text = StrCom;
its working 100%
Piyush Vardhan Singh
|
|
|
|
|
I have ASP.Net(vb) 1.1 app with SQL 2000 back-end, Crystal for VS. Here is my situation:
I have a crystal report that is populated dynamically using param stored procs which i load into a dataset to populate a datagrid. I take the current record selected from the datagrid and query for a max 5 of the customer's previous records, from the current record. I apply the current record to the dataset (table 1) I then take the previous 5 from the current record, flatten it, and populate (table 2) of the same dataset. This is an existinig report with over 500 fields and formulas so a redesign would be a monumental task. The problem is:
When there is 1 record in the datagrid or if I choose the last record from the datagrid, I get a blank PDF. In other words, if there are no previous records from the current record I get a blank PDF. The report should at least show me the current record, because if it is in my datagrid the record exists. But I don't get the currrent record (when there is only one in the grid) or the last record of multiple records from my datagrid. If there is at least 1 previous record the report is not blank.
I'm trying to state it from every angle possible.
I hope this makes since.
Please Help!
Where there is a Will there is a way. Right now, I'm looking for a good Will, because he knows the way!
|
|
|
|
|
I have a WebApplication Project (I installed the Visual Studio Add-In to create the project). This is not a Web Site Project.
I have two language resourse files. Resource.resx and Resource.es-es.resx file.
I have written code to change the culture dynamically. At first it was not working properly.
When I went and added the language into IE, I am able to change the language.
How can I do this without adding culture code into the IE's Language settings?
Please advise,
Shrini
|
|
|
|
|
|
Hi,
Seen this article already (http://kbalertz.com/306162/Current-Culture-Programmatically-Application.aspx) while trying to figure out everything.
currenly the tag is set to <globalization culture="auto" uiculture="auto"> in the web.config. I am manually changing it by changing the currentthread's culture. this only functions if I have added that culture in the IE language settings.
Otherwise the culture is not changing when I change it from a list. This is what I am confused about. Why would it not change? I should be able to just change the thread's culture and have the same effect without having to change my language settings.
Please advise,
Shrini
|
|
|
|
|
I m using vb.net 2005. I dont want to hard code my connectionstring I want to be able to pass the Database name and teh server name to my connectionstring
any vb.net code will be appreciated.
How do i serach a domain or a network for the servers
t.aransiola
|
|
|
|
|
I created a class which is to declare constant string variables used to store messages shown for the users. But now I heard about the resource file. I am doubt which one is the better. Is there any another better method to store messages to users? Please let me know your valid advice.
Thanks and Regards,
Hogan
|
|
|
|
|
hogan.smith wrote: Is there any another better method to store messages to users?
I never seen a resource file storing messages to user or constants. I'd like to use a XML file to store user specific messages, and write a XML serializable class which gives access to all these values.
|
|
|
|
|
Hi,
How can I make a installation project for a web Application with Setup and deploy Project of VS2005,
in fact copy files to wwwroot, but Setup and deploy Project, copies them to Program Files.
Best wishes
|
|
|
|
|
|
Which is the best method to store the dataset to access on the entire page with protected functions?
ViewState, Session or Cache?
Thanks
|
|
|
|
|
ss.mmm wrote: with protected functions?
What do you mean by protected functions ?
ss.mmm wrote: ViewState, Session
I prefer session if the DataSet contains less amount of data. Viewstate will increase network bandwidth.
ss.mmm wrote: Cache?
This can be used, but multiple users who visits your page at same time will get same results.
|
|
|
|
|
I know you can debug code-behind pages using breakpoints, however I'm trying to find out it there's a way to step through and debug an aspx page as well.
v2.0 is a great improvement over v1.1 however one place I'm finding myself spending more time is in debugging and I'm wondering if I'm not utilizing all of the debugging tools available to me in vs2005.
My current problem is I have a gridview which contains a dropdownlist in one of the columns when the user clicks "Edit" on a single row. The problem however is this dropdownlist value isn't updating in the database when the user clicks "Update", however since I'm using zero code in my code-behind page to perform the update(using a sqldatasource control), I don't know how to step through my glitch to find the source of the problem (could be the dropdownlist, could be a problem with the update statement, parameter may not be inheriting the value correctly, etc).
So I'm just wondering if there's a way to step through the code of an aspx page and aquire values of controls and properties while debugging.
Thanks.
-Goalie35
|
|
|
|
|
Is there any of inheriting master page inside a master page.
Because I want have two master page one at the folder level and another one application level and I want my folder master page to be inherited from application level master page.
|
|
|
|
|
Yes.
search for "nesting master pages"[^]
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
How to access the Code behind variables from client side(Javascript)?
Is there any other way apart from putting it in a hidden variable?
Thanks
|
|
|
|
|
Generate JavaScript in your server-side code that declares and assigns values to some global variables and use the ClientScriptManager class to include the JavaScript code in your HTTP response.
Paul Marfleet
|
|
|
|
|
i have used this code for sending mail . code was successfully running but msg was not sent to the client. i have using this below information.
To yogesh_softworld@yahoo.co.in
From yogeshdewangan97@gmail.com
SMTP Server 66.249.89.19 (gmail server ip)
SMTP User 127.0.0.1 (local host)
SMTP Pass archana123
Subject test email
Body abcabcabc.........................bc
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// This tutorial is provided in part by Server Intellect Web Hosting Solutions http://www.serverintellect.com
// Visit http://www.AspNetTutorials.com for more ASP.NET Tutorials
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
MailMessage message = new MailMessage(txtFrom.Text, txtTo.Text, txtSubject.Text, txtBody.Text);
SmtpClient emailClient = new SmtpClient(txtSMTPServer.Text);
System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential(txtSMTPUser.Text, txtSMTPPass.Text);
emailClient.UseDefaultCredentials = false;
emailClient.Credentials = SMTPUserInfo;
emailClient.Send(message);
litStatus.Text = "Message Sent";
}
catch (Exception ex)
{
litStatus.Text=ex.ToString();
}
}
}
then an exception was occured
System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.btnSubmit_Click(Object sender, EventArgs e) in e:\Yatra\Default.aspx.cs:line 32
wht can i do????
pls help me sir
yogesh
|
|
|
|
|
For goodness' sakes man, edit your message and remove your gmail password.
|
|
|
|
|
sir,
thank u for solution, but i am not understanding wht u r saying, so plz detailed me entire problem, it is very urget sir, i am trying with my full effort but i do not able to do that yet. plz sir wht can i do, my project submission date is about to come, plz sir heip me. i m very sirious,
adv thank you sir..................
yogesh
|
|
|
|
|
I do not have a solution (except that
SMTP Server 66.249.89.19 (gmail server ip)
SMTP User 127.0.0.1 (local host)
Looks odd to me - 127.0.0.1 is your local host, not a user)
I am just saying that you have posted your gmail username adn password in your post, and anyone can log in and use your account there using them. I suggest you edit your original post and remove your password from it. (Click the Modify link at the bottom of it)
|
|
|
|