Click here to Skip to main content
15,886,780 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Simple authentication without roles Pin
R. Giskard Reventlov10-Jun-10 5:25
R. Giskard Reventlov10-Jun-10 5:25 
QuestionRe: Simple authentication without roles Pin
Hemant Thaker10-Jun-10 8:31
Hemant Thaker10-Jun-10 8:31 
AnswerRe: Simple authentication without roles Pin
raju melveetilpurayil10-Jun-10 8:52
professionalraju melveetilpurayil10-Jun-10 8:52 
AnswerRe: Simple authentication without roles Pin
R. Giskard Reventlov10-Jun-10 22:26
R. Giskard Reventlov10-Jun-10 22:26 
Questionfusion chart from xml Pin
KhandelwalA10-Jun-10 2:42
KhandelwalA10-Jun-10 2:42 
AnswerRe: fusion chart from xml Pin
Peace ON10-Jun-10 2:49
Peace ON10-Jun-10 2:49 
GeneralRe: fusion chart from xml...............Resolved Pin
KhandelwalA10-Jun-10 3:04
KhandelwalA10-Jun-10 3:04 
Questionhow to get the client ip address who login his system in asp.net with c# Pin
developerit10-Jun-10 0:54
developerit10-Jun-10 0:54 
hi iam using asp.net with c#

in my application when user login successfully,then in the next page based on the client database i have to display data in a grid view ,

so how to give connection string in asp.net with c#

can you correct my code which helps me

protected void Page_Load(object sender, EventArgs e)
   {

       string strHostName = System.Net.Dns.GetHostName();
       string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();

       string strcon = "Data Source=";
       strcon += clientIPAddress+";" + "Initial Catalog=POS;Trusted_connection=true";


       SqlConnection con = new SqlConnection(strcon);
       SqlCommand cmd = new SqlCommand("select * from AllTransactions where BranchKey=" + Convert.ToInt32(Session["BranchKey"]) + "", con);

       SqlDataAdapter da = new SqlDataAdapter(cmd);
       DataSet ds = new DataSet();
       da.Fill(ds, "tt");
       GridView1.DataSource = ds.Tables["tt"];
       GridView1.DataBind();
   }




the data is displaying in my system but when client logins it is showing no record, can you correct my code
AnswerRe: how to get the client ip address who login his system in asp.net with c# Pin
Peace ON10-Jun-10 1:09
Peace ON10-Jun-10 1:09 
AnswerRe: how to get the client ip address who login his system in asp.net with c# Pin
Tej Aj14-Jun-10 2:54
Tej Aj14-Jun-10 2:54 
Questionhow to do validation of dynamically added textbox in asp.net Pin
hi_everybody9-Jun-10 19:57
hi_everybody9-Jun-10 19:57 
AnswerRe: how to do validation of dynamically added textbox in asp.net Pin
Sandeep Mewara9-Jun-10 20:13
mveSandeep Mewara9-Jun-10 20:13 
Questionsms alert Pin
trilokharry9-Jun-10 18:48
trilokharry9-Jun-10 18:48 
AnswerRe: sms alert Pin
Not Active9-Jun-10 19:03
mentorNot Active9-Jun-10 19:03 
AnswerRe: sms alert Pin
Sandeep Mewara9-Jun-10 19:04
mveSandeep Mewara9-Jun-10 19:04 
AnswerRe: sms alert Pin
Jamil Hallal9-Jun-10 20:07
professionalJamil Hallal9-Jun-10 20:07 
Questioncss file not getting applied by asp.net page Pin
Member 39190499-Jun-10 17:07
Member 39190499-Jun-10 17:07 
AnswerRe: css file not getting applied by asp.net page Pin
PSK_9-Jun-10 18:42
PSK_9-Jun-10 18:42 
AnswerRe: css file not getting applied by asp.net page Pin
Sandeep Mewara9-Jun-10 19:02
mveSandeep Mewara9-Jun-10 19:02 
AnswerRe: css file not getting applied by asp.net page Pin
Jamil Hallal9-Jun-10 20:10
professionalJamil Hallal9-Jun-10 20:10 
QuestionASP .Net Page with two languages Pin
FJJCENTU9-Jun-10 8:00
FJJCENTU9-Jun-10 8:00 
AnswerRe: ASP .Net Page with two languages Pin
T M Gray9-Jun-10 8:27
T M Gray9-Jun-10 8:27 
GeneralRe: ASP .Net Page with two languages Pin
FJJCENTU9-Jun-10 8:40
FJJCENTU9-Jun-10 8:40 
AnswerRe: ASP .Net Page with two languages Pin
Jamil Hallal9-Jun-10 20:13
professionalJamil Hallal9-Jun-10 20:13 
QuestionLinkButton Visibility inside a Gridview Pin
mtataric9-Jun-10 6:54
mtataric9-Jun-10 6:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.