|
Hi,
I am Encoding my Url like :
Response.Redirect("~/Default.aspx?"+Server.UrlEncode(("I1=18&I2=1&I3=506")));
It is working Fine,But When i tried to Decode the Url like :
Server.UrlDecode(Request.QueryString.ToString());
It is not working as expected , It is returning the Count of Query String as 1,But i expect it as 3,
Plz help me how to Decode the Querystring ?
Thanx in Advance!!!!
|
|
|
|
|
there r several predefined algorithm in .net security package which can be used dirctly to encode &decode the url............ok
|
|
|
|
|
i used the Server.EncodeUrl() method , i am talking based on this.
|
|
|
|
|
You should not encode the whole string "I1=18&I2=1&I3=506".
Since you are encoding the three query strings I1=18&I2=1&I3=506 into one, it is loaded as a single query string in the target page.
To avoid this, Encode querystring parameter I1 and the value 18 separately and join using '=' operator.
Repeat this for next paramters and theri values and join with the previous set using '&'.
It should be like below
Response.Redirect("~/Default.aspx?"+ "encodeedI1=encoded18& encodedI2= encoded1& encdoedI3=encoded506";
Then only you can get three Query Strings in the Default.aspx.
|
|
|
|
|
I have problem with url rewritting in IIS its working local good.
i tried RewriteModule.dll,
Intelligencia.UrlRewriter.dll,UrlRewritingNet.UrlRewriter.dll these three things.
I need to use this for profile view
ex:
Here i hv two application.
first one url
http://www.xyz.com/first/default.aspx
second one url
http://www.xyz.com/second/default.aspx
but my profile available in second app
when i trying view the profile in second applicaion i ll give my url as
http://www.xyz.com/profile/anand
that real url ll be
http://www.xyz.com/second/profile/profile.aspx
but it has to rewrite as
http://www.xyz.com/profile/anand
Thanks & Regards,
Anand Babu Subramanian
|
|
|
|
|
I can't follow this waffle, but URL rewriting is easy, just write your own class to do it. Sounds like you're using other classes - why ?
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 )
|
|
|
|
|
Hi,
I am developing a web app. and i have given a provision to upload images for the users of various categories, So i want to know if :
> storing images of various categories in a single folder is good rather than storing images in separate folders of different categories?
> Does these methods have performance variation , while fetching the url's during displaying the data?
Plz help
|
|
|
|
|
It plainly makes no difference to performance, but it could make a difference if filenames clash.
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 )
|
|
|
|
|
|
Hi there,
I want to fill combo box using link to sql.Can anybody able tell me how to do this.
Thanks
|
|
|
|
|
Hi, you can try this
dim dc as new datacontext()
dim x = (from a in dc.tables
select a.username
ddl1.datasource = x
ddl1.databind()
Hope this one can help
|
|
|
|
|
How can I change password by email and new password?
|
|
|
|
|
How do you think ? How do other sites do it ?
You store a key which is passed in on the URL sent to the email address given, which then validates that they got the email.
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 )
|
|
|
|
|
Hi all
Creating menu controls dynamically using javascript in asp.net using c#
mokana
|
|
|
|
|
Is this the header of an article you're starting, or is it meant to be a question ? As soon as you create stuff in javascript, ASP.NET is irrelevant. You'd be insane to write your own menus, when you can find so many reusable ones with a simple google search.
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 )
|
|
|
|
|
Suppose I send a email with a link to shahdat@example.com form my site(ex1.aspx) which run at localhost. After opening the mail one can return to the site(ex2.aspx) according to the link. Now I want to know, How can I recognize the email address(shahdat@example.com) from page ex2.aspx .
shahdat
|
|
|
|
|
Pass it in on the URL.
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 )
|
|
|
|
|
hi friends
this is my function:
Function GetRedPlayer() As String
Dim dt As New DataTable
Dim i As Integer
Dim dt1 As New DataTable
Dim j As Integer
Dim flag As Boolean = False
Dim sessonid As Integer = UserInfo.GetCurrentSeasonid()
Dim sqlquery As String = "select tavernid from tavern where paid=0"
dt = DBManager.GetDataTable(sqlquery)
If dt.Rows.Count > 0 Then
'Get tavernid
For i = 0 To dt.Rows.Count - 1
Dim Tv_id = dt.Rows(i)("tavernid").ToString()
'14 days current date
Dim For14GetDate As String = DateTime.Now.AddDays(-14).ToString()
Dim For14daysCurrentdate As String = For14GetDate.Substring(0, 9)
'current date
Dim GetDate As String = DateTime.Now.ToString()
Dim Currentdate As String = GetDate.Substring(0, 9)
Dim sqlqueryGetplayerid As String = "select Eventid from pokerevents where tavernid=" & Tv_id & " and seasonid = " & sessonid & " And tournamentdate >" & For14daysCurrentdate & " And tournamentdate <= '" & Currentdate & "'"
dt1 = DBManager.GetDataTable(sqlqueryGetplayerid)
If dt1.Rows.Count > 0 Then
For j = 0 To dt1.Rows.Count - 1
'Get eventid
Dim Ev_id = dt1.Rows(j)("eventid").ToString()
Dim StrScoreQuery As String = "Select points from scores where eventid=" & Ev_id & ""
Dim retVal As Int64 = DBManager.GetScalar(StrScoreQuery)
If flag = False Then 'begin flag
If retVal = -2 Then
flag = True
Dim SqlQueryGettavernID As String = "select tav.tavernid as tavernid from tavern tav join pokerevents pe on tav.tavernid=pe.tavernid where pe.eventid =" & Ev_id & ""
Dim TavidIsred As Integer = DBManager.GetScalar(SqlQueryGettavernID)
Dim updateQueryForRed As String = "update tavern set Isred=" & 0 & " where tavernid=" & TavidIsred & ""
DBManager.GetNameValueColl(updateQueryForRed)
Else
Dim SqlQueryGettavernIDForNotRed As String = "select tav.tavernid as tavernid from tavern tav join pokerevents pe on tav.tavernid=pe.tavernid where pe.eventid =" & Ev_id & ""
Dim TavidIsnotred As Integer = DBManager.GetScalar(SqlQueryGettavernIDForNotRed)
Dim updateQueryForNotRed As String = "update tavern set Isred=" & 1 & " where tavernid=" & TavidIsnotred & ""
DBManager.GetNameValueColl(updateQueryForNotRed)
End If
End If ' End flag
Next
End If
Next
End If
End Function
here i get near 5500 record in datatable and looping through that time i got error "ExecuteScalar:Connection property has not been initialized" like this in below function
Getscalr function:
Shared Function GetScalar(ByVal query As String) As Int64
Dim myconnGS As New OdbcConnection
Dim mycmdGS As New OdbcCommand
myconnGS = getConnection()
mycmdGS = New OdbcCommand(query, myconnGS)
GetScalar = mycmdGS.ExecuteScalar()//here i got the error
mycmdGS.Close()
Return GetScalar
End Function
can anyone help me?
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
Hi, try this
Shared Function GetScalar(ByVal query As String) As Int64
Dim r as Int32
Dim myconnGS As New OdbcConnection
Dim mycmdGS As New OdbcCommand
myconnGS = getConnection()
mycmdGS = New OdbcCommand(query, myconnGS)
r = mycmdGS.ExecuteScalar()//here i got the error
mycmdGS.Close()
Return GetScalar
End Function
Hope this one can help.
Thanks
|
|
|
|
|
thanks for reply
but same error occured
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
Hi, can u post the error?
|
|
|
|
|
ExecuteScalar:Connection property has not been initialized
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
Hi,
i need to know about 2 things.
1. Is there any way or article which shows u how to create a floating panel... that is consider a textbox to enter model name, somebody enters acer 1600 (acer brand, 1600 portion of model) and a panel appears (populated from tables 1. brand table 2. models)... Did you mean
Acer Aspire 1600
Acer Aspire 1600Z
Acer somemodelname 1600
and then a person choses one , this panel disappears, giving details of the model.. such panels are used in monster.com for login...
2. I am using linq and the sql table has 30000 rows, i know that i should do paging for the gridview but my client needs the application... he is not willing to give me time for that, project has been developed by somebody else and when u press search btn , it takes time to load the data, i want to insert a progress bar (it should not be a 0-100% progress bar... it can be something in javascript)...coming to the question... i simply added a label, just above the retrieval code, did the following
gridvu.datasource=null;
gridvu.visible=false;
lbl.text="Loading please wait";
but the previous gridview did not disappear, lbl was never displayed... Why?
thanx for helping...
|
|
|
|
|
Hello,
I am making first ever asp.net application and added lblusername,txtusername,lblpassword,txtpassword and btn signin in the master page for login purposes. i then provided functionality for the login (i have worked with desktop apps), when user found, copied his name to session and well, this worked...
but as i am still developing the application , i want my application to be signed in when i run it so i decided to provide the code in pageload of master page, which was there ( i don't know how this event was added) and it didn't work... searching through the methods and internet allowed me to know that there was a function onloadcomplete of page... i tried alot but i can't override this event... i don't get it in intellisense when i write override, also how do u add the init functions and events for a page...
Thanx for helping... i think, this question is probably very stupid but being a desktop application developer, i think asp.net can be very confusing...
please provid help
|
|
|
|
|
Hi, can u post your code?
If a user login in your page successfully log. then ur masterpage displayed
On your masterpage load event you can write this
txtUsername = sessiont("userName")
|
|
|
|